API Documentation
List Documents
This API endpoint allows you to list documents such as invoices, estimates, or purchase orders.
Endpoint
GET /api/document/list
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
doc_type | String | The type of document (invoice, estimate, purchase_order). | Yes |
customer_id | Integer | ID of the customer to filter documents. | No |
guid | String | The unique identifier (GUID) of a specific document to retrieve. | No |
before | String | GUID of the document to fetch documents created before it. | No |
Example Request
GET /api/document/list?doc_type=invoice&customer_id=123
Response
{ "success": true, "message": "List of documents", "result": { "documents": [ { "doc_number": "12345", "year": "2023", "doc_date": "2023-06-01", "due_date": "2023-07-01", "payement_method": "Cash", "guid": "your-document-guid", "customer_id": 123, "remark": "This is a remark.", "doc_total": "1000.00" }, ... ] } }
Error Response
{ "success": false, "message": "Error message detailing what went wrong" }