RMU API Portal v1.0
JWT Decoder Swagger UI สมัครเจ้าหน้าที่ เข้าสู่ระบบ
RMU ENTERPRISE RESTFUL API PLATFORM

Rajabhat Maha Sarakham University
API Developer Portal

แพลตฟอร์มศูนย์กลางเชื่อมโยงข้อมูลมหาวิทยาลัยราชภัฏมหาสารคาม สำหรับนักพัฒนาและหน่วยงานพันธมิตร เข้าถึงข้อมูลงบประมาณ บุคลากร ครุภัณฑ์ และหลักสูตรด้วยมาตรฐาน RESTful API

API Key Guard Oracle MIS & REGIS PostgreSQL Redis Cache Rate Limiting
47
Public Endpoints
4
API Service Groups
99.9%
System Reliability

ไม่พบ Endpoint ที่ค้นหา

ลองค้นหาด้วยคำค้นอื่น หรือกดปุ่ม ALL เพื่อแสดงรายการทั้งหมด

Authentication & Authorization

ทุก Request ที่ส่งเข้ามายังระบบ ต้องแนบ API Key ที่ได้รับอนุมัติผ่าน HTTP Header X-API-Key ดังตัวอย่างด้านล่าง:

curl -X GET 'https://ndev.rmu.ac.th/api/v1/budget?period_id=2568&budget_type=P01' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
ยังไม่มี API Key? เข้าสู่ระบบ Partner Portal เพื่อสร้างและจัดการสิทธิ์การเข้าถึง

Request Formats & Payload Guidelines

Endpoint ส่วนใหญ่ในระบบรองรับการเรียกใช้งานทั้งแบบ GET (Query String) และ POST (JSON Payload) ได้อย่างยืดหยุ่น:

GET (Query String)
GET /api/v1/line/link-status?type=staff&ids[]=1664&ids[]=2441
POST (JSON Body - แนะนำ)
{
  "type": "staff",
  "ids": [1664, 2441]
}

MIS

18 Endpoints
GET,POST /api/v1/asset/search ค้นหาครุภัณฑ์จากรหัสครุภัณฑ์ จากเลขครุภัณฑ์
Parameter Type Requirement
keyword string optional
GET GET query string query
?keyword=คอมพิวเตอร์
POST POST JSON body application/json
{
    "keyword": "คอมพิวเตอร์"
}
{
    "data": [
        {
            "assetid": 100245,
            "quantity": 1,
            "assetcode": "7440-001-0001/2568",
            "assetname": "เครื่องคอมพิวเตอร์ All-in-One",
            "assetstatus": 1,
            "currentvalue": 25000,
            "assetstatusname": "ใช้งานปกติ",
            "departmentfullname": "สาขาวิชาวิทยาการคอมพิวเตอร์"
        }
    ],
    "message": "ค้นหาครุภัณฑ์สำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/asset/search' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/asset/search', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/asset/statuses ดึงข้อมูลสถานะครุภัณฑ์ทั้งหมด
{
    "data": [
        {
            "assetstatus": 1,
            "assetstatusname": "ใช้งานปกติ"
        },
        {
            "assetstatus": 2,
            "assetstatusname": "ชำรุด"
        }
    ],
    "message": "ดึงข้อมูลสถานะครุภัณฑ์สำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/asset/statuses' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/asset/statuses', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/budget Retrieves budget summary and faculty-wise budget allocation data
Parameter Type Requirement
period_id string optional
budget_type string optional
GET GET query string query
?period_id=2569&budget_type=P01
POST POST JSON body application/json
{
    "period_id": "2569",
    "budget_type": "P01"
}
{
    "data": {
        "budget_faculty": [
            {
                "period_id": 2569,
                "total_plan": 3200000,
                "departments": [],
                "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
                "faculty_index": "01"
            }
        ],
        "budget_summary": [
            {
                "period_id": 2569,
                "total_plan": 12500000,
                "investment_flag": 1,
                "investment_name": "งบลงทุน"
            }
        ]
    },
    "message": "Budget data retrieved successfully.",
    "success": true,
    "budget_type": "P01"
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/budget' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/budget', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/plans ข้อมูลแผนงานทั้งหมดจาก MIS
{
    "data": [
        {
            "plan_id": 1,
            "gov_code": "0301",
            "plan_code": "P01",
            "plan_name": "แผนงานยุทธศาสตร์พัฒนาการศึกษา"
        }
    ],
    "message": "ดึงข้อมูลแผนงานสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/plans' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/plans', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/academic ดึงข้อมูลบุคลากรสายวิชาการ จากหลักสูตรที่ทำการสอน programcode
Parameter Type Requirement
department_id string optional
officer_status string optional
GET GET query string query
?department_id=0101&officer_status=1
POST POST JSON body application/json
{
    "department_id": "0101",
    "officer_status": "1"
}
{
    "data": [
        {
            "name": "ผศ.*** ใจด***",
            "staff_id": 1664,
            "faculty_id": "01",
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
            "department_name": "สาขาวิชาวิทยาการคอมพิวเตอร์",
            "staff_type_name": "ข้าราชการ",
            "degree_level_name": "ปริญญาเอก",
            "staff_status_name": "ปฏิบัติงาน"
        }
    ],
    "message": "ดึงข้อมูลบุคลากรสายวิชาการสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/academic' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/academic', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/contract ดึงข้อมูลอายุสัญญาคงเหลือ *ต้องส่ง staffid เข้ามาด้วย
Parameter Type Requirement
staff_id string optional
GET GET query string query
?staff_id=1664
POST POST JSON body application/json
{
    "staff_id": "1664"
}
{
    "data": {
        "contract_no": "ครุ 0101/2569",
        "contract_to": "2027-09-30",
        "contract_from": "2024-10-01",
        "contract_remaining": "1 ปี 2 เดือน"
    },
    "message": "ดึงข้อมูลสัญญาจ้างสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/contract' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/contract', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/degree-levels ดึงรายการระดับการศึกษาทั้งหมด
{
    "data": [
        {
            "degree_level_id": 3,
            "degree_level_code": "03",
            "degree_level_name": "ปริญญาเอก",
            "degree_level_name_abb": "ป.เอก"
        }
    ],
    "message": "ดึงข้อมูลระดับการศึกษาสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/degree-levels' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/degree-levels', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/degrees ดึงรายการวุฒิการศึกษาตามระดับการศึกษาที่ระบุ
Parameter Type Requirement
degree_level string optional
GET GET query string query
?degree_level=01
POST POST JSON body application/json
{
    "degree_level": "01"
}
{
    "data": [
        {
            "degree_id": 15,
            "degree_code": "0301",
            "degree_name": "ปรัชญาดุษฎีบัณฑิต",
            "degree_level": 3,
            "degree_name_abb": "ปร.ด.",
            "degree_name_abb_eng": "Ph.D."
        }
    ],
    "message": "ดึงข้อมูลวุฒิการศึกษาสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/degrees' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/degrees', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/departments ดึงรายการหน่วยงานที่สังกัดภายใต้คณะที่ระบุ
Parameter Type Requirement
faculty_id string optional
GET GET query string query
?faculty_id=01
POST POST JSON body application/json
{
    "faculty_id": "01"
}
{
    "data": [
        {
            "faculty_id": "01",
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
            "department_id": "0101",
            "department_code": "0101",
            "department_name": "วิทยาการคอมพิวเตอร์",
            "department_full_name": "สาขาวิชาวิทยาการคอมพิวเตอร์"
        }
    ],
    "message": "ดึงข้อมูลแผนกสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/departments' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/departments', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/faculties ดึงรายการหน่วยงานต้นสังกัด (คณะ) ทั้งหมด
{
    "data": [
        {
            "faculty_id": "01",
            "faculty_name": "คณะครุศาสตร์"
        },
        {
            "faculty_id": "02",
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี"
        }
    ],
    "message": "ดึงข้อมูลคณะสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/faculties' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/faculties', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/faculty-count Get staff count grouped by faculty
{
    "data": [
        {
            "faculty_id": "01",
            "departments": [],
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
            "staff_amount": 57,
            "officer_amount": 45,
            "support_amount": 12
        }
    ],
    "message": "ดึงข้อมูลจำนวนบุคลากรแยกตามคณะสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/faculty-count' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/faculty-count', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/gender-count ข้อมูลบุคลากร จำแนกตามเพศ ถ้าไม่ส่ง faculty_id เข้ามาจะรายงานระดับมหาวิทยาลัย แต่ถ้าส่งจะรายงานระดับคณะ
Parameter Type Requirement
faculty_id string optional
GET GET query string query
?faculty_id=01
POST POST JSON body application/json
{
    "faculty_id": "01"
}
{
    "data": [
        {
            "gender": 1,
            "gender_name": "ชาย",
            "gender_count": 30
        },
        {
            "gender": 2,
            "gender_name": "หญิง",
            "gender_count": 27
        }
    ],
    "message": "ดึงข้อมูลจำนวนบุคลากรแยกตามเพศสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/gender-count' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/gender-count', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/group-count ดึงข้อมูลจำนวนบุคลากรแยกตาม สายงาน สายวิชาการ สายสนับสนุน
Parameter Type Requirement
faculty_id string optional
GET GET query string query
?faculty_id=01
POST POST JSON body application/json
{
    "faculty_id": "01"
}
{
    "data": [
        {
            "male_count": 18,
            "staff_count": 33,
            "female_count": 15,
            "staff_group_id": 1,
            "staff_group_name": "ข้าราชการ"
        }
    ],
    "message": "ดึงข้อมูลจำนวนบุคลากรแยกตามกลุ่มสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/group-count' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/group-count', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/info ดึงข้อมูลบุคลากรรายบุคคลตามรหัสบุคลากร ถ้าเป็นสายวิชาการจะดึง officerid มาด้วย
Parameter Type Requirement
staff_id string optional
GET GET query string query
?staff_id=1664
POST POST JSON body application/json
{
    "staff_id": "1664"
}
{
    "data": {
        "name": "นาย*** ใจด***",
        "staff_id": 1664,
        "faculty_id": "01",
        "staff_code": "1664",
        "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
        "department_name": "สาขาวิชาวิทยาการคอมพิวเตอร์",
        "staff_type_name": "ข้าราชการ",
        "staff_status_name": "ปฏิบัติงาน"
    },
    "message": "ดึงข้อมูลบุคลากรสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/info' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/info', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/search ค้นหาบุคลากรด้วยชื่อหรือนามสกุล (ไทย/อังกฤษ) — ดึง record ที่ตรงกันล่าสุดตาม STAFFSTATUS และ ADMITDATE
Parameter Type Requirement
q string optional
GET GET query string query
?q=สมชาย
POST POST JSON body application/json
{
    "q": "สมชาย"
}
{
    "data": [
        {
            "name": "นาย*** ใจด***",
            "staff_id": 1664,
            "faculty_id": "01",
            "staff_code": "1664",
            "staff_type": 1,
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
            "staff_status": 1,
            "department_name": "สาขาวิชาวิทยาการคอมพิวเตอร์",
            "staff_type_name": "ข้าราชการ",
            "staff_status_name": "ปฏิบัติงาน"
        }
    ],
    "message": "ค้นหาบุคลากรสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/search' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/search', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/sex ดึงรายการเพศของบุคลากรทั้งหมด
{
    "data": [
        {
            "staff_sex": 1,
            "staff_sex_name": "ชาย"
        },
        {
            "staff_sex": 2,
            "staff_sex_name": "หญิง"
        }
    ],
    "message": "ดึงข้อมูลเพศสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/sex' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/sex', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/type ดึงรายการประเภทบุคลากรทั้งหมดจาก PROMIS.STAFFTYPE ยกเว้นประเภทที่ไม่ใช้งาน
{
    "data": [
        {
            "staff_type": 1,
            "staff_type_code": "01",
            "hr_uoc_staff_type_id": 1,
            "staff_type_full_name": "ข้าราชการพลเรือนในสถาบันอุดมศึกษา",
            "hr_staff_type_group_id": 1
        }
    ],
    "message": "ดึงข้อมูลประเภทบุคลากรสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/type' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/type', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/staff/type-count ข้อมูลบุคลากร จำแนกตามประเภทบุคลากร ข้าราชการ พนักงาน สามารถส่ง faculty_id เข้ามาได้เพื่อดึงข้อมูลของแต่คณะ
Parameter Type Requirement
faculty_id string optional
GET GET query string query
?faculty_id=01
POST POST JSON body application/json
{
    "faculty_id": "01"
}
{
    "data": [
        {
            "staff_type": 1,
            "staff_amount": 57,
            "officer_amount": 45,
            "support_amount": 12,
            "staff_type_name": "ข้าราชการ"
        }
    ],
    "message": "ดึงข้อมูลจำนวนบุคลากรแยกตามประเภทสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/staff/type-count' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/staff/type-count', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));

REGIS

7 Endpoints
GET,POST /api/v1/regis/active-programs ดึงข้อมูลหลักสูตรที่เปิดทำการเรียนการสอนทั้งหมด
{
    "data": [
        {
            "faculty_id": "01",
            "level_code": "01",
            "degree_name": "วิทยาศาสตรบัณฑิต",
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
            "program_code": "0101",
            "student_amount": 240,
            "level_code_name": "ปริญญาตรี",
            "program_code_name": "วิทยาการคอมพิวเตอร์"
        }
    ],
    "message": "ดึงข้อมูลหลักสูตรที่เปิดสอนสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/regis/active-programs' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/regis/active-programs', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/regis/active-programs/count-by-faculty นับจำนวนหลักสูตรและรวมจำนวนนักศึกษาที่เปิดสอนอยู่ จัดกลุ่มตามคณะ Aggregate
{
    "data": [
        {
            "faculty_id": "01",
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
            "program_count": 12,
            "student_amount": 2450,
            "program_count_by_level": []
        }
    ],
    "message": "ดึงข้อมูลจำนวนหลักสูตรแยกตามคณะสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/regis/active-programs/count-by-faculty' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/regis/active-programs/count-by-faculty', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/regis/active-programs/count-by-level นับจำนวนหลักสูตรที่เปิดสอน จัดกลุ่มตามระดับการศึกษา
{
    "data": [
        {
            "level_code": "01",
            "program_count": 45,
            "student_amount": 9800,
            "level_code_name": "ปริญญาตรี"
        }
    ],
    "message": "ดึงข้อมูลจำนวนหลักสูตรแยกตามระดับสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/regis/active-programs/count-by-level' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/regis/active-programs/count-by-level', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/regis/faculties ดึงข้อมูลคณะจากระบบทะเบียนทั้งหมด
{
    "data": [
        {
            "faculty_id": "01",
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
            "faculty_group": 1,
            "faculty_name_eng": "Faculty of Science and Technology"
        }
    ],
    "message": "ดึงข้อมูลคณะสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/regis/faculties' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/regis/faculties', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/regis/programs ดึงข้อมูลโปรแกรมวิชาพร้อมจำนวนนักศึกษาตาม Programcode And Levelcode
Parameter Type Requirement
programcode string optional
levelcode string optional
GET GET query string query
?programcode=0101&levelcode=01
POST POST JSON body application/json
{
    "levelcode": "01",
    "programcode": "0101"
}
{
    "data": [
        {
            "status": 1,
            "faculty_id": "01",
            "level_code": "01",
            "program_id": "25500101",
            "degree_name": "วิทยาศาสตรบัณฑิต",
            "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
            "program_code": "0101",
            "program_name": "วิทยาการคอมพิวเตอร์",
            "student_amount": 240,
            "level_code_name": "ปริญญาตรี"
        }
    ],
    "message": "ดึงข้อมูลหลักสูตรสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/regis/programs' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/regis/programs', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/regis/students/profile ดึงข้อมูล profile นักศึกษาจาก CCSERVICE.V_STUDENT ตามรหัสนักศึกษา (studentid)
Parameter Type Requirement
studentid string optional
GET GET query string query
?studentid=650012345
POST POST JSON body application/json
{
    "studentid": "650012345"
}
{
    "data": {
        "sname": "นาย*** ใจด***",
        "citizen_id": "12345***",
        "faculty_id": "01",
        "level_name": "ปริญญาตรี",
        "prefix_abb": "นาย",
        "student_id": 650012345,
        "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
        "program_name": "วิทยาการคอมพิวเตอร์",
        "student_code": "650012345",
        "student_name": "สมช***",
        "student_status": 1,
        "student_surname": "ใจด***",
        "student_status_name": "กำลังศึกษา"
    },
    "message": "ดึงข้อมูลโปรไฟล์นักศึกษาสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/regis/students/profile' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/regis/students/profile', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/regis/students/search ค้นหาข้อมูลนักศึกษาตามรหัสนักศึกษา (STUDENTCODE LIKE)
Parameter Type Requirement
studentcode string optional
GET GET query string query
?studentcode=value
POST POST JSON body application/json
{
    "studentcode": "value"
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/regis/students/search' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/regis/students/search', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));

Authentication

8 Endpoints
POST /api/v1/auth/qr/authorize ผู้ใช้กดยืนยันการเข้าสู่ระบบผ่านแอป LINE เพื่อสร้าง One-time exchange code
Parameter Type Requirement
ticket_id string optional
line_user_id string optional
POST POST JSON body application/json
{
    "ticket_id": "value",
    "line_user_id": "value"
}
{
    "message": "ยืนยันการเข้าสู่ระบบสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/auth/qr/authorize' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/auth/qr/authorize', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/auth/qr/exchange นำ One-Time Exchange Code มาแลกรับ Access Token และ Login Session สำหรับ Web
Parameter Type Requirement
ticket_id string optional
exchange_code string optional
POST POST JSON body application/json
{
    "ticket_id": "73acabc0-ca05-48b3-afdc-c901cf6e38fa",
    "exchange_code": "f8a92b3c1d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0"
}
{
    "data": {
        "mis_id": "1678",
        "sys_db": "QRLOGIN",
        "user_id": "1678",
        "mis_code": "2556057",
        "type_name": "พนักงานมหาวิทยาลัย(งบแผ่นดิน)",
        "user_code": "2556057",
        "user_type": "2",
        "avatar_url": "https://profile.line-scdn.net/0h123456abcdef",
        "faculty_id": "01",
        "program_id": "4",
        "user_status": "20",
        "faculty_name": "สำนักงานอธิการบดี",
        "program_name": "กองนโยบายและแผน",
        "user_fullname": "นายทินกร ผิวนวล",
        "user_type_name": "สายสนับสนุน",
        "user_citizen_id": "14411*******",
        "user_status_name": "ปกติ",
        "position_fullname": "นักวิชาการคอมพิวเตอร์ปฏิบัติการ",
        "user_fullname_eng": "Mr.Tinnakorn Peiwnual"
    },
    "message": "เข้าสู่ระบบสำเร็จ",
    "success": true,
    "access_token": "152|9QWJn87fyUrUuilHNzOpSDHo2j6mSJrqwUZhxHsQd356d375",
    "login_channel": "QRLOGIN",
    "profile_token": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..jq0W0rZbNiTqXquJ...",
    "refresh_token": "UckyOlMpBgWIIEDnVCcWRpmZq5mGXn9jMjUMZSB8W3ZtMC6pAQepz4SBkRtGAhj3"
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/auth/qr/exchange' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/auth/qr/exchange', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/auth/qr/reject ผู้ใช้กดยกเลิกการเข้าสู่ระบบผ่านแอป LINE
Parameter Type Requirement
ticket_id string optional
line_user_id string optional
POST POST JSON body application/json
{
    "ticket_id": "value",
    "line_user_id": "value"
}
{
    "message": "ยกเลิกการเข้าสู่ระบบแล้ว",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/auth/qr/reject' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/auth/qr/reject', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/auth/qr/scan บันทึกการเปิดสแกนจากแอป LINE และตรวจสอบข้อมูลบัญชีผู้ใช้ที่ผูกไว้
Parameter Type Requirement
ticket_id string optional
line_user_id string optional
line_channel_id string optional
POST POST JSON body application/json
{
    "ticket_id": "value",
    "line_user_id": "value",
    "line_channel_id": "value"
}
{
    "data": {
        "role": "บุคลากร (สายสนับสนุน)",
        "user_id": "1678",
        "fullname": "นายทินกร ผิวนวล",
        "user_code": "2556057",
        "avatar_url": "https://profile.line-scdn.net/0h123456abcdef"
    },
    "linked": true,
    "message": "พบข้อมูลการผูกบัญชี",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/auth/qr/scan' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/auth/qr/scan', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/auth/qr/sessions สร้าง Session Ticket และ QR Code สำหรับเข้าสู่ระบบด้วย LINE (ThaiD style)
Parameter Type Requirement
partner_id string optional
redirect_uri string optional
state string optional
POST POST JSON body application/json
{
    "state": "random_anti_csrf_string",
    "partner_id": "06d66ea9-d457-4a4d-bfc2-dab057c95256",
    "redirect_uri": "https://partner-app.rmu.ac.th/auth/callback"
}
{
    "data": {
        "liff_url": "https://liff.line.me/2010634370-TRdTrjvd?action=qr_login&ticket=73acabc0-ca05-48b3-afdc-c901cf6e38fa",
        "ticket_id": "73acabc0-ca05-48b3-afdc-c901cf6e38fa",
        "expires_at": "2026-08-17T10:05:00+07:00",
        "qr_image_url": "https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https%3A%2F%2Fliff.line.me%2F2010634370-TRdTrjvd%3Faction%3Dqr_login%26ticket%3D73acabc0-ca05-48b3-afdc-c901cf6e38fa",
        "expires_in_seconds": 180
    },
    "message": "สร้าง QR Login Session สำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/auth/qr/sessions' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/auth/qr/sessions', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/auth/qr/sessions/{ticketId}/status ตรวจสอบสถานะ QR Code Login Session (Polling) ผ่าน Route Parameter หรือ Body
Parameter Type Requirement
ticketId string optional
POST POST JSON body application/json
{
    "ticketId": "value"
}
{
    "data": {
        "status": "authorized",
        "exchange_code": "f8a92b3c1d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0",
        "expires_in_seconds": 165,
        "exchange_code_expires_at": "2026-08-17T10:02:30+07:00"
    },
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/auth/qr/sessions/{ticketId}/status' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/auth/qr/sessions/{ticketId}/status', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/auth/qr/status ตรวจสอบสถานะ QR Code Login Session (Polling) ส่ง Ticket ID ผ่าน Request Body JSON
Parameter Type Requirement
ticket_id string optional
POST POST JSON body application/json
{
    "ticket_id": "value"
}
{
    "data": {
        "status": "authorized",
        "exchange_code": "f8a92b3c1d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0",
        "expires_in_seconds": 165,
        "exchange_code_expires_at": "2026-08-17T10:02:30+07:00"
    },
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/auth/qr/status' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/auth/qr/status', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/authen/login ยืนยันตัวตนผ่าน RMU Legacy API Gateway ด้วย username และ password
Parameter Type Requirement
username string optional
password string optional
POST POST JSON body application/json
{
    "password": "••••••••",
    "username": "partner_user"
}
{
    "data": {
        "sys_db": "REGIS",
        "user_id": 225610,
        "user_code": "650012345",
        "user_type": "student",
        "avatar_url": "https://profile.line-scdn.net/0h123456abcdef",
        "user_status": 1,
        "faculty_name": "คณะวิทยาศาสตร์และเทคโนโลยี",
        "user_fullname": "นาย*** ใจด***",
        "user_type_name": "นักศึกษา",
        "user_citizen_id": "12345***",
        "user_status_name": "กำลังศึกษา"
    },
    "message": "เข้าสู่ระบบสำเร็จ",
    "success": true,
    "access_token": "12|abcdefghijklmnop...",
    "login_channel": "REGIS",
    "profile_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refresh_token": "9f8e7d6c5b4a..."
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/authen/login' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/authen/login', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));

Line Message API

14 Endpoints
GET,POST /api/v1/line/generate-qr สร้าง QR Code และ One-Time Token สำหรับผูกบัญชี LINE รายบุคคล (รองรับทั้ง staff และ student)
Parameter Type Requirement
user_type string optional
user_id string optional
GET GET query string query
?user_type=value&user_id=value
POST POST JSON body application/json
{
    "user_id": "value",
    "user_type": "value"
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/line/generate-qr' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/generate-qr', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/line/link-status ตรวจสอบว่าผู้ใช้ในกลุ่ม staff/student ผูกบัญชี LINE ไว้แล้วหรือยัง (ระบุ ids เป็น student_id/staff_id ได้สูงสุด 100 รายการต่อครั้ง)
Parameter Type Requirement
type string optional
ids string optional
GET GET query string query
?type=staff&ids[]=1664&ids[]=2441
POST POST JSON body application/json
{
    "ids": [
        1664,
        2441
    ],
    "type": "staff"
}
{
    "data": {
        "type": "staff",
        "results": [
            {
                "id": 1664,
                "linked": true,
                "linked_at": "2026-06-01T10:00:00+07:00",
                "avatar_url": "https://profile.line-scdn.net/0h123456",
                "display_name": "สมช***"
            },
            {
                "id": 2441,
                "linked": false,
                "linked_at": null,
                "avatar_url": null,
                "display_name": null
            }
        ],
        "channel_active": true
    },
    "message": "ตรวจสอบสถานะสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/line/link-status' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/link-status', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages ส่งข้อความ text ผ่าน LINE ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
message string optional
recipients string optional
POST ส่งทุกคนในกลุ่ม (ไม่ระบุ recipients) application/json
{
    "type": "staff",
    "message": "สวัสดีครับ นี่คือข้อความทดสอบจากระบบ"
}
POST ส่งรายบุคคล (ระบุ recipients) application/json
{
    "type": "staff",
    "message": "แจ้งเตือนเฉพาะบุคคล",
    "recipients": [
        1664,
        2441
    ]
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/audio ส่งไฟล์เสียงผ่าน LINE ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
original_content_url string optional
duration string optional
recipients string optional
POST POST JSON body application/json
{
    "type": "staff",
    "duration": 60000,
    "recipients": [
        1664,
        2441
    ],
    "original_content_url": "https://example.com/audio/voice.m4a"
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/audio' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/audio', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/buttons ส่ง LINE Buttons template (หัวข้อ/เนื้อหา + ปุ่มสูงสุด 4 ปุ่ม) ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
alt_text string optional
title string optional
text string optional
thumbnail_image_url string optional
actions string optional
recipients string optional
POST POST JSON body application/json
{
    "text": "เปิดให้ลงทะเบียนแล้ววันนี้",
    "type": "staff",
    "title": "ลงทะเบียนเรียน",
    "actions": [
        {
            "uri": "https://reg.rmu.ac.th",
            "type": "uri",
            "label": "เปิดเว็บไซต์"
        }
    ],
    "alt_text": "ประกาศจากมหาวิทยาลัย",
    "recipients": [
        1664,
        2441
    ],
    "thumbnail_image_url": "https://example.com/images/banner.jpg"
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/buttons' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/buttons', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/carousel ส่ง LINE Carousel template (หลายการ์ดเลื่อนได้ สูงสุด 10 การ์ด แต่ละการ์ดมีปุ่ม 1-3 ปุ่ม) ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
alt_text string optional
columns string optional
recipients string optional
POST POST JSON body application/json
{
    "type": "staff",
    "columns": [
        {
            "text": "รับสมัครนักศึกษาใหม่",
            "title": "วิทยาการคอมพิวเตอร์",
            "actions": [
                {
                    "uri": "https://reg.rmu.ac.th/cs",
                    "type": "uri",
                    "label": "รายละเอียด"
                }
            ],
            "thumbnail_image_url": "https://example.com/images/cs.jpg"
        }
    ],
    "alt_text": "หลักสูตรที่เปิดรับสมัคร",
    "recipients": [
        1664,
        2441
    ]
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/carousel' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/carousel', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/confirm ส่ง LINE Confirm template (ข้อความถาม + ปุ่ม 2 ปุ่ม) ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
alt_text string optional
text string optional
actions string optional
recipients string optional
POST POST JSON body application/json
{
    "text": "ท่านจะเข้าร่วมกิจกรรมหรือไม่?",
    "type": "staff",
    "actions": [
        {
            "text": "ยืนยันเข้าร่วม",
            "type": "message",
            "label": "เข้าร่วม"
        },
        {
            "text": "ไม่เข้าร่วม",
            "type": "message",
            "label": "ไม่เข้าร่วม"
        }
    ],
    "alt_text": "ยืนยันการเข้าร่วม",
    "recipients": [
        1664,
        2441
    ]
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/confirm' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/confirm', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/flex ส่ง LINE Flex Message (เลือกสี header ซึ่งใช้เป็นสีข้อความด้วย + layout full/row_column) ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
alt_text string optional
header_color string optional
header string optional
layout string optional
contents string optional
recipients string optional
POST POST JSON body application/json
{
    "type": "staff",
    "header": "ประกาศ",
    "layout": "vertical",
    "alt_text": "ข่าวประชาสัมพันธ์",
    "contents": [
        {
            "text": "รายละเอียดข่าวประชาสัมพันธ์",
            "type": "text",
            "wrap": true
        }
    ],
    "recipients": [
        1664,
        2441
    ],
    "header_color": "#06c755"
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/flex' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/flex', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
GET,POST /api/v1/line/messages/flex_v2 ส่ง LINE Flex Message v2 โดยใช้โครงสร้าง JSON ต้นฉบับจาก LINE Flex Simulator ไปยังกลุ่ม staff หรือ student
Parameter Type Requirement
type string optional
alt_text string optional
flex_json string optional
header string optional
header_color string optional
text string optional
text_color string optional
bg_color string optional
recipients string optional
GET GET query string query
?type=staff&alt_text=value&flex_json=value&header=value&header_color=value&text=value&text_color=value&bg_color=value&recipients=value
POST POST JSON body application/json
{
    "text": "value",
    "type": "staff",
    "header": "value",
    "alt_text": "value",
    "bg_color": "value",
    "flex_json": "value",
    "recipients": "value",
    "text_color": "value",
    "header_color": "value"
}
{
    "data": {
        "type": "staff",
        "status": "sent",
        "skipped": [],
        "success_count": 1,
        "recipient_count": 1
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X GET,POST 'https://ndev.rmu.ac.th/api/v1/line/messages/flex_v2' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/flex_v2', {
  method: 'GET,POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/image ส่งรูปภาพผ่าน LINE ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
original_content_url string optional
preview_image_url string optional
recipients string optional
POST POST JSON body application/json
{
    "type": "staff",
    "recipients": [
        1664,
        2441
    ],
    "preview_image_url": "https://example.com/images/announce-preview.jpg",
    "original_content_url": "https://example.com/images/announce.jpg"
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/image' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/image', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/image-carousel ส่ง LINE Image Carousel template (หลายการ์ดรูปภาพ สูงสุด 10 การ์ด การ์ดละ 1 ปุ่ม) ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
alt_text string optional
columns string optional
recipients string optional
POST POST JSON body application/json
{
    "type": "staff",
    "columns": [
        {
            "action": {
                "uri": "https://example.com/event1",
                "type": "uri",
                "label": "ดูภาพ"
            },
            "image_url": "https://example.com/images/event1.jpg"
        }
    ],
    "alt_text": "แกลเลอรีภาพกิจกรรม",
    "recipients": [
        1664,
        2441
    ]
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/image-carousel' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/image-carousel', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/location ส่งตำแหน่งที่ตั้งผ่าน LINE ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
title string optional
address string optional
latitude string optional
longitude string optional
recipients string optional
POST POST JSON body application/json
{
    "type": "staff",
    "title": "มหาวิทยาลัยราชภัฏมหาสารคาม",
    "address": "80 ถนนนครสวรรค์ ต.ตลาด อ.เมือง จ.มหาสารคาม 44000",
    "latitude": 16.185,
    "longitude": 103.301,
    "recipients": [
        1664,
        2441
    ]
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/location' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/location', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/sticker ส่งสติกเกอร์ผ่าน LINE ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
package_id string optional
sticker_id string optional
recipients string optional
POST POST JSON body application/json
{
    "type": "staff",
    "package_id": "446",
    "recipients": [
        1664,
        2441
    ],
    "sticker_id": "1988"
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/sticker' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/sticker', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
POST /api/v1/line/messages/video ส่งวิดีโอผ่าน LINE ไปยังกลุ่ม staff/student (ระบุ recipients เป็น student_id/staff_id เพื่อส่งรายบุคคลได้)
Parameter Type Requirement
type string optional
original_content_url string optional
preview_image_url string optional
recipients string optional
POST POST JSON body application/json
{
    "type": "staff",
    "recipients": [
        1664,
        2441
    ],
    "preview_image_url": "https://example.com/videos/clip-preview.jpg",
    "original_content_url": "https://example.com/videos/clip.mp4"
}
{
    "data": {
        "type": "staff",
        "status": "completed",
        "skipped": 2,
        "success_count": 118,
        "recipient_count": 120
    },
    "message": "ส่งข้อความสำเร็จ",
    "success": true
}
cURL
curl -X POST 'https://ndev.rmu.ac.th/api/v1/line/messages/video' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Accept: application/json'
JavaScript (Fetch)
fetch('https://ndev.rmu.ac.th/api/v1/line/messages/video', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));