CurrencyExchangeRates (POST)

Overview

This POST API can be used to save the Currency Exchange Rates received from the ERP to GEP Quantum

URL Format: https://<instance>.gep.com/leo-centraldata-exchangerateservice/api/v1/ExchangeRateMaster/Multiple 
 

Request
[
    {
        "clientCode": "code-01",
        "sourceSystem": "API",
        "isActive": true,
        "targetCurrency": "EUR",
        "reverseExchangeRate": 0.0312,
        "isDefault": false,
        "effectiveDate": "2023-08-02T08:08:30.091Z",
        "fromCurrency": "USD",
        "exchangeRate": 50.12
    },
    {
        "clientCode": "code-02",
        "sourceSystem": "API",
        "isActive": true,
        "targetCurrency": "USD",
        "reverseExchangeRate": 0.0312,
        "isDefault": false,
        "effectiveDate": "2023-08-02T08:08:30.091Z",
        "fromCurrency": "EUR",
        "exchangeRate": 50.12
    }
]
Response
{
    "returnValue": {
        "totalCount": 1,
        "successCount": 1,
        "errorCount": 0,
        "failedRequests": [
        ],
        "successResult": {
            "successIdentifiers": [
                {
                }
            ]
        },
        "id": 200,
        "status": "Success",
        "errors": null,
        "_id": null,
        "_ids": [
            "1"
        ]
    },
    "isSuccess": true,
    "errors": null,
    "exception": null,
    "errorMessage": null,
    "errorCode": null,
    "correlationId": null
}
Data Elements

PROPERTY

REQUIRED

DATA TYPE

DESCRIPTION

_id

Yes

string

·       Mandatory for delete, update operation.

·       _id of the Exchange Rate

clientCode

No

string

·       Non-Mandatory field

·       Unique field

fromCurrency

Yes

String (10)

·       Mandatory field

·       Max length is 10.

·       Validated from Currency against code.

targetCurrency

Yes

String (10)

·       Mandatory field

·       Max length is 10.

·       Validated from Currency against code.

reverseExchangeRate

No

Decimal

·       Non-Mandatory field

·       Upto 9 integers before decimal and upto 15 integers after decimal

exchangeRate

Yes

Decimal

·       Non-Mandatory field

·       Upto 9 integers before decimal and upto 15 integers after decimal

·       If from & to currency are set as same, then the conversion rate will default to 1 irrespective of the exchange rate entered.

·       Default value - 0

effectiveDate

 Yes

string(date-time)

·       Mandatory field

·       The allowed date format is DD/MM/YYYY

·       Please enter date only in this format

sourceSystem

 Yes

string

·       Default value is “API.”

isActive

No

bool

·       Default value is TRUE.

isDefault

No

bool

·       Default value is FALSE.

·       Only one true value is allowed.

lobCode

Yes - when IsLobRequired flag is enabled.

string

·       Validated from Organization Structure.

·       Mandatory when IsLobRequiredflag is enabled.

·       When this flag is disabled lobCode will be ALL

 

Validation

Property

Scenario

Error Message

clientCode

If record is already present for given client code.

Record Already Exists for given Client Code

sourceSystem

1.     Incorrect source system value.

2.     Null/Empty value

1.     Invalid Source system value.

2.     Value cannot be null/empty.

targetCurrency

Incorrect currency code.

Invalid target currency.

reverseExchangeRate

Value outside the allowed range.

Input string not a valid decimal.

effectiveDate

Incorrect format of date

Cannot convert string to Date Time.

fromCurrency

Incorrect currency code.

Invalid base currency.

exchangeRate

Value outside the allowed range.

Input string not a valid decimal.