Working with FlowAccount documents
FlowAccount organizes everything around documents, not journal entries. Each document family has its own endpoint, and the Daslab tools mirror that: every document tool takes a document_type naming the family.
The document families
document_type | What it is | Typical use |
|---|---|---|
tax_invoices | ใบกำกับภาษี — VAT tax invoice | The standard sales document for VAT-registered businesses |
invoices | ใบแจ้งหนี้ — invoice | Billing a customer before payment |
receipts | ใบเสร็จรับเงิน — receipt | Confirming money received |
billing_notes | ใบวางบิล — billing note | Batching several invoices for one collection |
quotations | ใบเสนอราคา — quotation | Pre-sale pricing |
expenses | ค่าใช้จ่าย — expense record | Purchases and operating costs |
purchase_orders | ใบสั่งซื้อ — purchase order | Ordering from suppliers |
Thai businesses often issue combined documents (e.g. tax invoice/receipt in one). In FlowAccount those live under the family that leads the combination — when a document you expect is missing from one list, check the neighboring family before concluding it doesn't exist.
Reading
flowaccount_list_documentsreturns one page per call (page,page_size, default 20). The response carriestotal— page until you've covered it when consolidating a period.- Lists return summary rows (serial, contact, dates, status, grand total).
flowaccount_get_documentreturns the full body: line items, VAT flags, and discounts. - Contacts and products have their own list/get tools; contact codes and product codes are how documents reference them.
Creating
flowaccount_create_document passes your payload to the Open API as-is — Daslab does not compute totals or VAT for you. The reliable workflow:
flowaccount_list_documentsfor the target family, take a recent document.flowaccount_get_documenton it and copy its field shape — contact fields,publishedOn/dueDateformats, theitemsarray (name,quantity,pricePerUnit,total), and the summary fields (subTotal,isVatInclusive,vatAmount,grandTotal).- Send your new payload with the same shape and your values. Compute the totals yourself and keep them consistent with the line items — the API validates, it does not fix.
Creation requires approval in Daslab, so a job proposes the document and a person confirms before anything lands in the books.
Multi-branch and multi-business patterns
- One FlowAccount business = one connected account asset. A group running several legal entities connects each, and tools take an
accountIdto pick the business when more than one is connected. - Branch-level consolidation (e.g. daily sales across many outlets) is a read pattern: list the day's receipts/tax invoices, group by whatever field the business uses to mark the branch (document serial prefix, project name, or sales name), and reconcile against POS or storefront totals from the other side.