My Products
Help
Palveluna
CONTRIBUTOR *

(0005-InvalidState) Currency rate not found for to EUR with rate type SPOT.

by Palveluna

During last few days, starting from 17.10.2024 and still continuing, API sales orders V3 has been returning error "(0005-InvalidState) Currency rate not found for to EUR with rate type SPOT." with some of the sales orders, total of 10-12 orders, within thousands of valid V3 sales orders.

 

As we diagnosed it, portal has only one currency which is set up as it should and this error came out of the blue. Is something changed in the v3 sales orders API, but not documented or did we find a new issue, or would it be possible to be lucky for thousands of successful sales orders and we’ve been missing something critical from sales order messages so far? We also tried setting the currency ID with the sales order, but it was not accepted "Currency Id can not be overridden (1408-OverrideCurrencyIdProhibited)." but as said, portal has only one currency. Is there something we’ve missed?

Please find attached example, anonymized, sales order;

{"type":"xx","status":"Hold","date":"2024-10-23T10:49:50.0000","requestOn":"2024-10-23T10:49:50.0000","customer":{"id":"00000","refNo":"00000"},"billing":{"contact":{"name":"xxx","attention":"xxx","email":"x.x@x.x","phone1":"000"},"address":{"line1":"x","postalCode":"00000","city":"x","countryId":"FI"}},"shipping":{"contact":{"name":"xxx","attention":"xxx","email":"x.x@x.x"},"address":{"line1":"x","postalCode":"00000","city":"xx","countryId":"FI"},"shipViaId":"xxx"},"orderLines":[{"inventoryId":"1","quantity":2},{"inventoryId":"1a","quantity":1},{"inventoryId":"2","quantity":1},{"inventoryId":"3","quantity":10},{"inventoryId":"2a","quantity":5},{"inventoryId":"4","quantity":2},{"inventoryId":"5","quantity":4},{"inventoryId":"4a","quantity":2}]}

4 REPLIES 4
Joni Wolff
PARTNER

by Joni Wolff

We will fix so that the error does not appear if the default supplier does not have a currency ID set, but until then, as a workaround, setting the currency ID on the supplier will eliminate the error.

Palveluna
CONTRIBUTOR *

by Palveluna

We got a response through another channel that the reason for the error might be that ordered items had a default supplier for which a currency had not been set. We're currently testing the solution.

We were instructed to set suppliers' Currency IDs in the General information tab. If other items are added to orders with a default supplier that does not have the currency set, other suppliers should be checked to prevent the error from happening again.

Theis
CONTRIBUTOR ***

by Theis

Thanks for the reply Palveluna, but that must mean something was changed in the endpoints logic.
Will try and update here with our result.

Theis
CONTRIBUTOR ***

by Theis

I can just confirm, that we have a customer with the same issue, not all orders are failing but some are.

We ran several tests, it is not related to the customer, it is specific items that are causing the error.

Items has been sent via API without issue before and we can enter in the items without issue directly in Visma.NET.


Issue also started for us, on the 17th of October at 07:51 CET.

Please reach out to me, if you need more details or want to run tests.

 

"details": [
{
"code": "0005-InvalidState",
"message": "Currency rate not found for to NOK with rate type SPOT",
"parameters": {
"property": ""
}
}
],