ดึงรายการ Supplier ทั้งหมดของธุรกิจ
Suppliers เป็นข้อมูลระดับ Business ไม่แยกตามสาขา — ทุก Token ที่มี Scope read:purchasing จะเห็น Supplier ทั้งหมดของธุรกิจ
Endpoint นี้เหมาะสำหรับ:
supplier_id สำหรับ filter ใน List Purchase Ordersread:purchasing
Access Token ต้องได้รับ Scope read:purchasing มิฉะนั้นระบบจะปฏิเสธคำขอ
GET /api/partner/v1/suppliers
Authorization: Bearer <access_token>
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | No | กรองตามสถานะ: ACTIVE หรือ INACTIVE |
| q | string | No | ค้นหาจาก company_name หรือ supplier_code (1–255 ตัวอักษร) |
| limit | integer | No | จำนวนรายการต่อหน้า (1–200) ค่าเริ่มต้น 50 |
| cursor | string | No | Cursor สำหรับดึงหน้าถัดไป |
Endpoint นี้ใช้ Cursor-based Pagination
หาก has_more เป็น true ให้ส่ง next_cursor กลับมาใน parameter cursor
GET /api/partner/v1/suppliers?cursor=<next_cursor>
curl -X GET \
"https://<host>/api/partner/v1/suppliers?status=ACTIVE&limit=50" \
-H "Authorization: Bearer <access_token>"
{
"data": [
{
"id": "...",
"supplier_code": "SUP-001",
"company_name": "บริษัท ABC จำกัด",
"contact_name": "คุณสมชาย",
"phone_number": "02-000-0000",
"email": "contact@abc.co.th",
"tax_id": "0123456789012",
"address": "123 ถนนสุขุมวิท",
"city": "กรุงเทพมหานคร",
"province": "กรุงเทพมหานคร",
"postal_code": "10110",
"country": "Thailand",
"payment_terms": "Net 30",
"status": "ACTIVE",
"created_at": "2026-05-01T00:00:00.000Z",
"updated_at": "2026-05-01T00:00:00.000Z"
}
],
"pagination": {
"next_cursor": null,
"has_more": false,
"limit": 50
}
}
| Field | Type | Description |
|---|---|---|
| id | string (UUID) | Supplier ID |
| supplier_code | string | รหัส Supplier |
| company_name | string | ชื่อบริษัท / ร้านค้า |
| contact_name | string | null | ชื่อผู้ติดต่อ |
| phone_number | string | null | เบอร์โทรศัพท์ |
| string | null | อีเมล | |
| tax_id | string | null | เลขประจำตัวผู้เสียภาษี |
| address | string | null | ที่อยู่ |
| city | string | null | เมือง / เขต |
| province | string | null | จังหวัด |
| postal_code | string | null | รหัสไปรษณีย์ |
| country | string | null | ประเทศ |
| payment_terms | string | null | เงื่อนไขการชำระเงิน เช่น Net 30 |
| status | ACTIVE | INACTIVE | สถานะ Supplier |
| created_at | string (ISO 8601) | เวลาที่สร้าง record |
| updated_at | string (ISO 8601) | เวลาที่แก้ไขล่าสุด |