เอกสาร API และ Dashboard สำหรับลูกค้า Firmer — ดูสถานะการส่ง-รับข้อมูลผ่าน Lab Plus Gateway
กรุณาใส่ token เพื่อดูสถานะการทำงาน
เอกสาร API สำหรับการส่งและรับข้อมูลผ่าน Gateway
result/| Key | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
{
"order_id": "ORD-9981",
"result": "positive",
"data": { ... }
}
curl -X POST https://labplusgw.com/firmer/receive_result.php \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"order_id":"ORD-9981","result":"positive"}'
{
"status": "success",
"filename": "result_20260517_103000_a1b2.json",
"size": 1234,
"received_at": "2026-05-17T10:30:00+07:00"
}
request/ แล้ว POST ไปยัง endpoint ของ Firmerhttps://devapi.fellowlis.com/external/fellowMiddlewareService/order
| โฟลเดอร์ | หน้าที่ |
|---|---|
request/ | วางไฟล์ JSON ที่จะส่ง |
request_backup/ | ไฟล์ที่ส่งสำเร็จ (HTTP 2xx) |
request_failed/ | ไฟล์ที่ส่งล้มเหลว (HTTP 4xx / data ผิด) |
result/ | ไฟล์ result ที่รับมาจาก Firmer |
logs/ | send.log, receive.log |
# ตั้งให้รันทุก 1 นาที
* * * * * apache /usr/bin/php \
/var/www/html/labplus_gw/firmer/send_orders.php