Add Document Line

API to add a line to an existing document.

URL

/documentline/add

Method

GET

Parameters

Name Type Required Description
guid String Yes GUID of the doc.
doc_type String Yes Type of doc
text String No Description of the line item.
unit_price Float No Unit price of the line item.
quantity Integer No Quantity of the line item.
discount_percentage Float No Discount percentage for the line item.
discount_amount Float No Discount amount for the line item.
vat_rate Float Yes VAT rate for the line item.
packages Integer No Number of packages for the line item (default is 1).

Success Response

{
    "success": true,
    "message": "Document line added successfully",
    "result": {
        "guid_line": "generated-guid-line"
    }
}

Error Response

{
    "success": false,
    "message": "Error message"
}

Example Request

GET /documentline/add?guid=example-guid&doc_type=invoice&text=Product+Description&unit_price=10.50&quantity=2&discount_percentage=5&discount_amount=1&vat_rate=21&packages=1