API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Vatcode required, why?

I don't understand why the API requires you to enter the vatcode on each account that requires it.

This is already configured in the E-conomic system, why would you need to mention it at all?

It just creates major redundancy since we have to configure and program for vatcodes in our system before importing to E-conomic instead of just mentioning the correct account and let E-conomic figure it out...
created Jun 27, 2013 by Zyme
33% Accept Rate
Q 5 A 3 C 3

1 Answer

Best answer
Hi Zyme,

I'm assuming you mean when creating cash book entries?

Since a blank/NULL VatCode is completely valid, we unfortunately cannot treat NULL as "just pick it up from the Chart of Accounts" - since, then, the API would have no way of distinguishing between that intent and the intent to actually set VatCode to NULL.

You could argue that the above only applies when using data classes, where you have to explicitly set all properties - whereas, when using proxy classes or the simple Create...() methods - specifying only the Account and/or ContraAccount - automatic setting of VatCode based on settings from the Chart of Account would be entirely feasible. I might even be inclined to agree with you that, in hindsight, we should probably have made it so.

However, introducing side effects in such an important area retroactively could effectively constitute a breaking change for certain integrations - in which developers have depended on the current functionality.


Best regards,
answered Jun 28, 2013 by Christian Estrup
selected Jun 28, 2013 by Jostein
Yes... it would have been much better if it was "opt-out"... so if you really wanted a NULL vatcode you actually send the value NULL to the field or otherwise it would pick up the setting from the E-conomic system...
Visma e-conomic A/S