API Documentation

Update Document

This API endpoint allows you to update a document such as an invoice, estimate, or purchase order.

Endpoint

POST /api/document/update

Parameters

Parameter Type Description Required
guid String The unique identifier (GUID) of the document to update. Yes
doc_type String The type of document (invoice, estimate, purchase_order). Yes
year Integer The accounting year of the document. No
doc_number Integer The document number. No
doc_date String The date the document was added (Format YYYY-MM-DD). No
payement_method String The payment method of the document. No
due_date String The due date of the document. No
customer_id Integer The ID of the customer linked to the document. No
remark String General remark for the document. No

Example Request

POST /api/document/update?guid=your-document-guid&doc_type=invoice&year=2023&doc_number=12345&doc_date=2023-06-01&payement_method=Cash&due_date=2023-07-01&customer_id=123&remark=This%20is%20a%20remark
            

Response

{
    "success": true,
    "message": "Updated successfully"
}
            

Error Response

{
    "success": false,
    "message": "Error message detailing what went wrong"
}