Create Calculate Queue
ส่งคำขอคำนวณโควตาเข้าคิวเพื่อประมวลผลแบบ Asynchronous เหมาะสำหรับการคำนวณจำนวนพนักงานมาก
Endpoint
POST /api/v1/open-apis/salary/update-data-filterRequest Body
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
path_action | string | Yes | ต้องเป็น create_calculate_quota_queue | "create_calculate_quota_queue" |
quota_year | string | Yes* | ปีโควตา (YYYY) ต้องระบุอย่างน้อยหนึ่ง field | "2026" |
year_month | string | Yes* | เดือน/ปี (YYYY-MM) ต้องระบุอย่างน้อยหนึ่ง field | "2026-03" |
company_id | string | No | กรองตามบริษัท (Base64) | - |
branch_id | string | No | กรองตามสาขา (Base64) | - |
department_id | string | No | กรองตามแผนก (Base64) | - |
position_id | string | No | กรองตามตำแหน่ง (Base64) | - |
employee_id | string | No | เฉพาะพนักงานคนเดียว (Base64) | - |
keyword | string | No | ค้นหาพนักงาน | - |
ต้องระบุ quota_year หรือ year_month อย่างน้อยหนึ่งตัว
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": {
"queue_id": "20260220QU01A2B3C4D5",
"status": "queued",
"created_at": "2026-02-20 16:00:00"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
queue_id | string | ID คิว (plain text) |
status | string | สถานะ: "queued" = อยู่ในคิว |
created_at | string | วันเวลาที่สร้างคิว |
Error Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"errors": ["Missing required parameter: 'quota_year' or 'year_month'"]
}Code Examples
cURL
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/salary/update-data-filter" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"path_action": "create_calculate_quota_queue",
"quota_year": "2026"
}'Notes
- ข้อมูลจะถูกประมวลผลแบบ Asynchronous API จะตอบกลับทันทีหลัง validate สำเร็จ
- ใช้แทน Calculate Quota เมื่อมีพนักงานจำนวนมากเพื่อหลีกเลี่ยง timeout
- ผลลัพธ์จะถูกอัปเดตในระบบเมื่อประมวลผลเสร็จ
Related APIs
- Calculate Quota - คำนวณโควตาแบบ Synchronous (พนักงานน้อย)
- Calculate Year - ปรับปีที่นับโควตา
- Reset Quota - รีเซ็ตโควตา
Last updated on