Developer documentation

Sales invoice - Add an invoice line with a product

A very important element of any sales invoice is the lines for the items it contains. Below is the easy way to add an invoice line for the product you already added in your administration. You can check here on how to add new product.

For an invoice line in your payload you need to mention “DocumentLineList” attribute. This is an array with all the lines you want to add within. Here if you only mention Quantity, Price and TaxRate then the server will calculate all the correct amounts for you.

Request Info

Production base URL
Operation : PUT
Content type : application/json
URI Parameter : {adminid} is the GUID for an admin you subscribed. {id} globally unique identifier of the sales invoice for which you aim to add lines.

Let us have a look at sample request containing DocumentLineList with Product.

Request Body

    "id": "f200868c-5000-41ea-8fe3-08563887f19b",
    "Status": 1,	
    "DocumentLineList": [
      "Sequence": 1,
      "Quantity": 2,
      "AfterDiscountAmount": 405,
      "LineTotalPayableAmount": 490.05,
      "NetAmount": 405,
      "Price": 135,
      "Description": "Allium Gladiator His Excellence",
      "InvoiceLineType": 11,
      "Product": {
        "id": "5c1a0b7b-2a27-4395-bce0-29347ca5944e",
        "Code": "0040",
        "Description": "Allium Gladiator His Excellence",
        "SearchName": "Allium Gladiator His Excellence",
        "ProductKind": 1,
        "Price": 135
      "Project": null,
      "UnitOfMeasurement": {
        "id": "dde1cb30-f64e-4620-95a9-f414ea3418a8",
        "Code": "ST",
        "Description": "Each",
        "PluralName": "Each"
      "DocumentCategoryAccount": {
        "id": "c881405b-bca0-4eea-9cce-f4f80ffb33c0",
        "Name": "Omzet 1"
      "Department": null,
      "Employee": null,
      "TaxRate": {
        "id": "1e44993a-15f6-419f-87e5-3e31ac3d9383"

For the said request you would receive response as illustrated below via url:{adminid}/salesinvoices/{id}/Lines/

 Request Return

  "value": [    
      "id": "067da34f-c2f7-43ea-9b07-2d881fd22fd2",
      "Sequence": 2,
      "Quantity": 4,
      "AfterDiscountAmount": 600,
      "LineTotalPayableAmount": 726,
      "NetAmount": 600,
      "Price": 150,
      "TotalAmount": 600,
      "TaxAmount": 126,
      "Date": "2017-04-25T00:00:00",
      "Description": "Entrecote",
      "InvoiceLineType": 4,
      "DiscountAmount": null,
      "DiscountPercentage": null

With this request every line will be created as mentioned under “DocumentLineList” attribute. you may add multiple lines at the same time. Once the line is added you can see that it is assigned a GUID automatically which you may refer for later use. 

NL Select your country