• POST rest/addsalesinvoice/

      • Add a sales invoice

This POST method allows you to create a new sales invoice and automatically mutate the invoiced products stock levels based on the invoice line quantities. This method will create an invoice within the ‘Facturatie’ (Invoicing) module of our software.

Notes:

  • Maximum 50 invoice lines per invoice allowed.
  • If CustomerNumber is used to identify the customer, the number must be greater then zero. A zero value will be interpreted as empty.
  • If CustomerName is used to identify the customer and you have multiple customers with exactly the same name, we will use the first found match.
  • You are required to add at least one invoice line. The invoice line must either contain a parameter ‘ProductNumber’ or ‘ProductEAN’. The value entered in either of those fields must refer to an existing product in your Silvasoft administration.
  • A stock mutation for the selected product will be automatically created.
  • Request
  • Response

Parameters

CustomerNumber ** Integer Details
The customer, identified by its customer number, to be associated with the invoice
CustomerName ** String Details
The customer, identified by its name, to be associated with the invoice
AddAsDraft Boolean (true|false) Details
Defaults to false. If set to true, the invoice will we added as a draft ('concept' invoice)
InvoiceDate Date String (dd-MM-yyyy) Details
The invoice date in format dd-MM-yyyy. (http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html) Defaults to current date.
InvoiceNumber Long Details
An optional invoice number. Please note this number MUST be unique.
InvoiceNotes String Details
The invoice description
InvoiceDiscountPc Float Details
Discount % to be applied to the invoice
InvoiceReference String Details
Invoice reference number or text (max. 150 characters)
InvoiceDueDays Integer Details
In how much days must the invoice be payed? Leave empty or set to 0 to ignore.
PackingSlipNotes String Details
Extra notes for the packing slip
InvoiceProject String Details
The project by either projectnumber or project name to be associated with the invoide
SelectProjectBy String Details
Allowed values: NAME or NUMBER. Determines wether the value in the parameter 'InvoiceProject' is the projectname or projectnumber.
HtmlAsPlainText Boolean (true|false) Details
Whether the response rich-text fields (notes and packing slip notes) will be returned as plain text or not. Defaults to false.
Invoice_InvoiceLine * Array Details
An JSON array of invoice lines. At least one record must be present.
Invoice_InvoiceLine > ProductNumber ** String Details
The productnumber of the product to be associated with the invoice line.
Invoice_InvoiceLine > ProductEAN ** String Details
The product EAN code of the product to be associated with the invoice line.
Invoice_InvoiceLine > Quantity * Float Details
Quantity of units of the product for this invoice line
Invoice_InvoiceLine > UnitPriceExclTax Float Details
Price per ordered unit
Invoice_InvoiceLine > TaxPc ** Float Details
Numeric representation of the tax % to be applied for this invoice line. Please note that this percentage must be available within your Silvasoft administration.
Invoice_InvoiceLine > TaxCode ** String Details
The tax code to apply to this invoice line. For example if you have multiple tax codes with the same percentage, you can identify a specific tax code with this parameter.
Invoice_InvoiceLine > SubTotalInclTax Float Details
The invoice line subtotal, including taxes. When this parameter is set, the price per unit will be ignored and automatically calculated.
Invoice_InvoiceLine > Description String Details
Invoice line description

CURL Example

Parameters


Response JSON Example

The response order can vary from the parameter order above