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

Adding Product Name to Invoice Line using REST API


Hi there

Is it possible to add the Product Name to the invoice lines using the REST API?

I got everything else working, but are not able to add this crucial information to the invoice lines.

I'm trying something like this in the POST request:


'product' => array(
'productNumber' => '1',
'name' => 'Test Product'


best regards




created Mar 28, 2016 by ahthomsen
0% Accept Rate
Q 1 A 0 C 0
Hello  Ahthomsen,

How you solve your problem? I am facing same issue.

Thank you

1 Answer

Hi Anders,
We have provided an easy way for you to create invoice lines and have the correct prices and discounts applied to that line. 
An example of this is found here:
The thing is that prices may vary from customer to customer, from currency to currency and also the number of units sold. The rules for these discounts and localized prices can be quite complex and depend on certain extra modules or choices made on customer groups or only select customers. Having to check all of these settings is near impossible for you as a developer, so we have provided an invoice line template for each customer and each product. The same goes for the invoice itself, although the rules here are less complex. We have provided a template for that like this example shows:
The way to use these templates is to do a GET request to the template in question and then edit what ever you need to edit, or just go with the defaults. When done then POST or PUT the document where you need it and you should be done. The default for the invoice line is to have the product name added as the description.
You can read about this in more detail here:
Please be aware that this only applies to the new invoices-experimental endpoint which will replace the old invoices endpoint soon.
answered Mar 29, 2016 by rbb
Visma e-conomic A/S