Skip to main content

เพิ่มการตรวจสอบผู้ติดต่อ และจำกัด pageSize สำหรับ GET APIs สินค้าและข้อมูลผู้ติดต่อ

  1. เพิ่มเงื่อนไขการตรวจสอบ contactType สำหรับการสร้างและแก้ไขเอกสาร
  2. จำกัดค่า pageSize สูงสุดไม่เกิน 200 สำหรับ GET APIs สินค้าและข้อมูลผู้ติดต่อ

ผู้ใช้งานสามารถทดลองบน Sandbox Environment เพิ่มเติมได้ตั้งแต่วันที่ 10/06/2026

เริ่มมีผลบน Production Environment วันที่ 24/06/2026


1. เพิ่มเงื่อนไขการตรวจสอบข้อมูลการติดต่อ (Contact) สำหรับการสร้างและแก้ไขเอกสาร

FlowAccount OpenAPI ได้เพิ่มเงื่อนไขการตรวจสอบข้อมูลติดต่อ (Contact) ให้ตรงกับประเภทเอกสาร เพื่อป้องกันการสร้างเอกสารด้วยข้อมูลผู้ติดต่อที่ประเภทไม่ถูกต้อง หาก contactType ไม่ตรงกับประเภทเอกสาร ระบบจะ return error

รายละเอียด

ในกรณีที่ใช้งานข้อมูลติดต่อที่ไม่เคยมีอยู่ในระบบ ข้อมูลติดต่อนั้น จะถูกสร้างเป็นข้อมูลติดต่อใหม่ โดยประเภทของข้อมูลติดต่อจะขึ้นอยู่กับประเภทของเอกสาร

  • ถ้าถูกสร้างผ่านเอกสารขาย ประเภทของข้อมูลติดต่อจะเป็นประเภท ลูกค้า
  • ถ้าถูกสร้างผ่านเอกสารซื้อ ประเภทของข้อมูลติดต่อจะเป็นประเภท ผู้จำหน่าย

เมื่อใช้งานข้อมูลติดต่อ (Contact) ที่มีอยู่ในระบบ จะถูกตรวจสอบตามเงื่อนไขดังนี้

ประเภทเอกสารcontactType ที่อนุญาต
เอกสารขาย (Tax Invoice, Billing Note, Quotation, Cash Invoice, Receipt)3 = ลูกค้า หรือ
7 = ผู้จำหน่ายและลูกค้า
เอกสารซื้อ (Receiving Inventory, Purchase Order, Expense)5 = ผู้จำหน่าย หรือ
7 = ผู้จำหน่ายและลูกค้า

Error Response

เมื่อระบุ contactId ที่มี contactType ไม่ตรงกับประเภทเอกสาร ระบบจะ return error response ดังนี้

{
"data": null,
"status": false,
"message": "Contact type is not compatible with this document type",
"code": 70000
}

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
  • PUT /cash-invoices/{id}

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

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

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

  • POST /purchases
  • POST /purchases/with-payment
  • POST /purchases/inline
  • POST /purchases/inline/with-payment
  • POST /upgrade/purchases
  • POST /upgrade/purchases/with-payment
  • POST /upgrade/inline
  • POST /upgrade/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}

2. จำกัดค่า pageSize สูงสุดไม่เกิน 200 สำหรับ GET APIs สินค้าและข้อมูลผู้ติดต่อ

FlowAccount OpenAPI ได้เพิ่มการจำกัดค่า pageSize สำหรับ GET APIs สินค้าและข้อมูลผู้ติดต่อ โดยกำหนดค่าสูงสุดไม่เกิน 200 รายการต่อหน้า หากระบุค่าเกิน 200 ระบบจะ return error

รายละเอียด

ระบบจะตรวจสอบค่า pageSize ที่ส่งเข้ามาใน Query Parameter ตามเงื่อนไขดังนี้

กรณีผลลัพธ์
ไม่ระบุ pageSizeใช้ค่า Default (20 รายการ)
ระบุ pageSize ≤ 200แสดงผลตามจำนวนที่ระบุ
ระบุ pageSize > 200ระบบจะ return Error (HTTP 400)

Error Response

เมื่อระบุค่า pageSize มากกว่า 200 ระบบจะ return error response ดังนี้

{
"data": null,
"status": false,
"message": "pageSize must not exceed 200",
"code": 207400
}
การดึงข้อมูลหน้าอื่นๆ

หากมีข้อมูลมากกว่า 200 รายการ สามารถใช้ Query Parameter currentPage เพื่อระบุหน้าที่ต้องการดึงข้อมูลได้ ตัวอย่างเช่น

# ดึงข้อมูลหน้าที่ 1 (รายการที่ 1-200)
GET /products?pageSize=200&currentPage=1

# ดึงข้อมูลหน้าที่ 2 (รายการที่ 201-400)
GET /products?pageSize=200&currentPage=2

# ดึงข้อมูลหน้าที่ 3 (รายการที่ 401-600)
GET /products?pageSize=200&currentPage=3

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

  • GET /products
  • GET /product-masters
  • GET /contacts