Autoinvoice & emailing for customer invoices

Below you can find detailed information about these operations and how to better use them in order to satisfy your needs.

NOTE : The bellow interactions are not available for draft invoices ! If you have a draft and wish to use any of these functionalities, you should first bookkeep it either through the eAccounting app or by using the v2/customerinvoicedrafts/{customerInvoiceDraftId}/convert

1. Sending via Email

Endpoint: POST v2/customerinvoices/{invoiceId}/email

This operation allows the user to send an invoice by email, similar to the way this is done in eAccounting. Mainly this endpoint can be used in 2 different ways:

  • using default data : you can skip entering values on one, two or even all the properties in the JSON model. By doing this, the endpoint will use information from the invoice's customer like email address, CC emails etc and from the company settings. More information related to default data can be found on https://developer.vismaonline.com/v2.0/reference#customerinvoicesv2_sendemail .

  • using custom data : if you want to send the invoice towards a different email than the one present on the customer level or maybe you want to specify a different subject or email body, you can specify that in your JSON model.

402

JSON data for fully customized email settings

Above we can see a use case when all the properties have been entered. Now the endpoint will ignore all the data from the customer and the company settings and send the email with the information provided by you.

289

JSON data for partially customized email settings

Another use case can be seen above. The email sent will have the following properties:

  • email address : default one, described by the field Email Address on the invoice's customer
  • CC recipients : default one, described the field Email Addresses on the invoice's customer
  • subject : the default subject text from eAccounting will be overridden by the value in the JSON
  • message: the default message text from eAccounting will be overridden by the value in the JSON

2. Sending via Autoinvoice

Endpoint: POST v2/customerinvoices

This operation allows the user to create a customer invoice and send it via Autoinvoice, providing that he has it activated for the company in use.
In order to accomplish this process, the user must set a value to the SentType property in the JSON, like in the below image:

503

JSON data for creating a customer invoice and sending it as electronic invoice via Autoinvoice

Further information and values for this functionality can be found at the API Reference for creating a customer invoice.