curl --location '/api/v1/core/documents/preview' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"delivery": {
"companyCode": "GO51104",
"companyBranchCode": "00000",
"email": "buyer@example.com"
},
"header": {
"documentType": "388",
"templateNo": "INV-7QX2K9",
"issueDate": "2026-06-17T10:30:00+07:00",
"isVatIncluded": false,
"buyer": {
"name": "บริษัท ตัวอย่าง จำกัด",
"taxId": "0105556000000",
"taxIdSchemeId": "TXID",
"branchNo": "00000",
"buildingNumber": "123",
"street": "สุขุมวิท",
"subDistrictCode": "100502",
"districtCode": "1005",
"provinceCode": "10",
"postCode": "10110",
"countryCode": "TH"
}
},
"items": [
{
"lineId": 1,
"productName": "บริการที่ปรึกษา",
"unitPrice": 1000,
"quantity": 2,
"unit": "ครั้ง",
"vatTypeCode": "VAT"
}
],
"remark": "ชำระภายใน 30 วัน"
}'