curl --location '/api/v1/core/documents/replacement' \
--header 'Idempotency-Key;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"referenceDocumentId": "11111111-1111-1111-1111-111111111111",
"referenceDocumentNo": "INV-2026-0001",
"referenceDocumentDate": "2026-06-10",
"referenceDocumentTypeCode": "388",
"purposeCode": "TIVC02",
"templateNo": "INV-7QX2K9",
"buyer": {
"name": "บริษัท ตัวอย่าง (แก้ที่อยู่) จำกัด",
"taxId": "0105556000000",
"taxIdSchemeId": "TXID",
"branchNo": "00000"
},
"items": [
{
"lineId": 1,
"productName": "บริการที่ปรึกษา",
"unitPrice": 1000,
"quantity": 2,
"unit": "ครั้ง",
"vatTypeCode": "VAT"
}
]
}'