GET POST | /Currency/CurrencyGet | Gets information on current currencies | Uses your API Key and some Filters in an array format and returns the search results using the given filters.
Optionally, you can use ReturnTopNRecords to limit the number of the results to the specified number (omit, or add ReturnTopNRecords = -1 to get all the available results). The ReturnTopNRecords chooses the top records in a DiscountID descending order.
A. Get all the current currencies (as mvCurrencies objects).
Value: {}
Response: {
"mvCurrencies": [
{
"CurrencyId": 22,
"CurrencyCode": "DZD",
"CurrencyDescription": "Algerian Dinar (DZD)",
"CurrencySymbol": "din",
"CurrencyIsDefault": false,
"CurrencyInReports": false
},
{
"CurrencyId": 21,
"CurrencyCode": "EUR",
"CurrencyDescription": "Euro (EUR)",
"CurrencySymbol": "EUR",
"CurrencyIsDefault": false,
"CurrencyInReports": true
},
{
"CurrencyId": 20,
"CurrencyCode": "USD",
"CurrencyDescription": "US Dollar (USD)",
"CurrencySymbol": "USD",
"CurrencyIsDefault": true,
"CurrencyInReports": true
}
],
"ResponseStatus": {
"ErrorCode": "0"
}
}
B.
Returns the first 10 mvCurrency objects with CurrencyID greater than 2 whose description contains the word "Euro".
We can add two Filters by using the AndOr operator as shown below:
Value: {
"Filters": [
{
"FieldName": "currencyID",
"SearchOperator": "GreaterThan",
"SearchValue": 2
},
{
"AndOr": "And",
"FieldName": "currencydescription",
"SearchOperator": "Contains",
"SearchValue": "Euro"
}
],
"ReturnTopNRecords": 10
}
Response: {
"mvCurrencies": [
{
"CurrencyId": 21,
"CurrencyCode": "EUR",
"CurrencyDescription": "Euro (EUR)",
"CurrencySymbol": "EUR",
"CurrencyIsDefault": false,
"CurrencyInReports": true
}
],
"ResponseStatus": {
"ErrorCode": "0"
}
}
|
---|