Reeleezee GitHub page

Add manual invoice line

As you already know how we can add the invoice line with the product, let us have a look at how you can manually add the line by specifying the GUID on your own. It would be almost same as we seen under topic ‘Add invoice line with product’ except GUID. Here you would know how you can directly provider new GUID generated by you along with the line attributes to create a new line. This is one more alternative way to add the lines into a sales invoice. Let us look at the request related info.

Request Info

Production base URL   https://portal.reeleezee.nl/api/v1
Operation : PUT
Content type : application/json
Request   https://portal.reeleezee.nl/api/v1/{adminid}/salesinvoices/{id}
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 new GUID already

Request Body

{
    "id": "f200868c-5000-41ea-8fe3-08563887f19b",
    "Status": 1,	
    "DocumentLineList": [
    {
      "id":"c1761b07-7684-4d60-bd0a-3911bd71bab9",
      "Sequence": 2,
      "Quantity": 2,
      "Price": 135,
      "Description": "Allium Gladiator His Excellence",
      "InvoiceLineType": 4,
      "DiscountAmount": null,
      "DiscountPercentage": null,
      "TaxRate": {
        "id": "1e44993a-15f6-419f-87e5-3e31ac3d9383"
      }
    }
  ]
}

For the said request you would receive response as illustrated below via url: https://portal.reeleezee.nl/api/v1/{adminid}/salesinvoices/{id}/Lines/ 

Request Return

{
  "value": [
    {
      "id": "c1761b07-7684-4d60-bd0a-3911bd71bab9",
      "Sequence": 1,
      "Quantity": 3,
      "AfterDiscountAmount": 405,
      "LineTotalPayableAmount": 490.05,
      "NetAmount": 405,
      "Price": 135,
      "TotalAmount": 405,
      "TaxAmount": 85.05,
      "Date": "2017-04-25T00:00:00",
      "Description": "Allium Gladiator His Excellence",
      "InvoiceLineType": 11,
      "DiscountAmount": null,
      "DiscountPercentage": null
    }
  ]
}

This way you can add lines to your sales invoice.