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

Unable to set correct invoice margin

When creating an invoice, it is not possible to set the correct margin for invoice/products. It is always just 100% margin after transferring through the API.

On the lines I have tried both the function "CurrentInvoiceLine_CreateFromData" and the "CurrentInvoiceLine_Create". With the last method I have set all the product data with each function starting with "setProduct" and ending with "SetUnitNetPrice" and "SetQuantity". The invoice has also the correct "MarginAsPercent" and "TotalMargin".

What is wrong? It's frustrating... Please help, thanks!
created Apr 17, 2015 by MG
0% Accept Rate
Q 1 A 0 C 0

1 Answer


Please include your UnitCostPrice on your lines. Margin is calculated based on UnitCostPrice.
answered Apr 20, 2015 by olej
Visma e-conomic A/S