Skip to main content

รองรับการระบุผู้ติดต่อด้วย contactId ในการจัดการเอกสาร

ปรับปรุง Payload การสร้างรายชื่อ (Contact) ผ่านระบบสร้างเอกสาร

FlowAccount OpenAPI ได้ปรับเปลี่ยนเงื่อนไขการระบุข้อมูลผู้ติดต่อ (contact) เมื่อทำการสร้าง หรืออัปเดตเอกสาร โดยมีรายละเอียดดังต่อไปนี้

ผู้ใช้งานสามารถทดสอบได้บน Sandbox

Sandbox API url: https://openapi.flowaccount.com/test

เริ่มมีผลบน Production Environment: 20/01/2026

รายละเอียดการเปลี่ยนแปลง

FlowAccount OpenAPI ได้มีการเพิ่ม field contactId ในการสร้าง หรืออัปเดตเอกสาร เพื่อให้สามารถระบุผู้ติดต่อ (contact) ได้อย่างถูกต้อง โดยมีเงื่อนไขดังนี้ :

1. กรณีระบุ contactId มาใน Payload

ระบบจะให้ความสำคัญกับ contactId เป็นหลัก โดยไม่สนใจว่า contactName ที่ส่งมาจะตรงกันหรือไม่ โดยที่ผู้ใช้งานสามารถ Get ค่าของ contactId ได้จาก Product and Contact > Contacts > Get list all contacts

  • กรณี Contact นั้นมีอยู่ในระบบ (Active Contact): ระบบจะเชื่อมโยงเอกสารเข้ากับ Contact นั้น และดึงข้อมูลล่าสุดจากฐานข้อมูล มาบันทึกในเอกสารทันที
  • กรณีไม่พบ ID: จะได้รับ Error: Contact is invalid

2. กรณีไม่ระบุ contactId (ระบุเพียง contactName)

ระบบจะเข้าสู่กระบวนการตรวจสอบเพื่อใช้ข้อมูลเดิมหรือสร้าง Contact ใหม่อัตโนมัติ

  • หากพบ contactName ซ้ำกับที่มีในระบบ และไม่มี contactCode: ระบบจะเลือกใช้ Contact เดิมที่มีอยู่
  • หากไม่เข้าเงื่อนไขข้างต้น: ระบบจะทำการสร้างผู้ติดต่อใหม่ให้ทันทีตามข้อมูลที่ระบุใน Payload โดยที่จะระบุ field contactCode เป็น empty string

APIs ที่จะได้รับผลกระทบ

APIs สร้างเอกสารใบเสนอราคา (Quotations)

  • POST /quotations
  • POST /quotations/inline
  • PUT /quotations/{id}

APIs สร้างเอกสารใบวางบิล (Billing Notes)

  • POST /billing-notes
  • POST /billing-notes/inline
  • POST /upgrade/billing-notes
  • POST /upgrade/billing-notes/inline
  • PUT /billing-notes/{id}

APIs สร้างเอกสารใบกำกับภาษี (Tax Invoices)

  • POST /tax-invoices
  • POST /tax-invoices/with-payment
  • POST /tax-invoices/inline
  • POST /tax-invoices/inline/with-payment
  • POST /upgrade/tax-invoices
  • POST /upgrade/tax-invoices/with-payment
  • POST /upgrade/tax-invoices/inline
  • POST /upgrade/tax-invoices/inline/with-payment
  • PUT /tax-invoices/{id}

APIs สร้างเอกสารใบเสร็จรับเงิน (Receipts)

  • POST /upgrade/receipts
  • POST /upgrade/receipts/with-payment
  • POST /upgrade/receipts/inline
  • POST /upgrade/receipts/inline/with-payment
  • PUT /receipts/{id}

APIs สร้างเอกสารใบกำกับภาษี/ใบเสร็จรับเงิน (Cash Invoices)

  • POST /cash-invoices
  • POST /cash-invoices/with-payment
  • POST /cash-invoices/inline
  • POST /cash-invoices/inline/with-payment
  • POST /upgrade/cash-invoices
  • POST /upgrade/cash-invoices/with-payment
  • POST /upgrade/cash-invoices/inline
  • POST /upgrade/cash-invoices/inline/with-payment

APIs สร้างเอกสารใบสั่งซื้อ (Purchase Orders)

  • POST /purchases-orders
  • POST /purchases-orders/inline
  • POST /upgrade/purchases-orders
  • POST /upgrade/purchases-orders/inline
  • PUT /purchases-orders/{id}

APIs สร้างเอกสารใบรับสินค้า (Purchases)

  • POST /purchases
  • POST /purchases/with-payment
  • POST /purchases/inline
  • POST /purchases/inline/with-payment
  • POST /upgrade/purchases
  • POST /upgrade/purchases/with-payment
  • POST /upgrade/purchases/inline
  • POST /upgrade/purchases/inline/with-payment
  • PUT /purchases/{id}

APIs สร้างเอกสารค่าใช้จ่าย (Expenses)

  • POST /expenses
  • POST /expenses/with-payment
  • POST /expenses/inline
  • POST /expenses/inline/with-payment
  • PUT /expenses/{id}