Tenant API Docs
คู่มือเชื่อมต่อเว็บไซต์ของคุณกับ EasyTourAgent
ใช้หน้านี้สำหรับทีม dev ของ tenant: ฝัง widget, ดึง catalog ทัวร์, เปิดรายละเอียดทัวร์, โหลดรอบเดินทาง และส่ง booking กลับเข้าระบบ.
API key
ใช้ jt_live เฉพาะฝั่ง server เท่านั้น.
Widget token
ใช้ jt_widget สำหรับหน้าเว็บและล็อก origin ได้.
Version
เอกสารชุดนี้อ้างอิง ETA API v1.0.
Widget iframe
เหมาะสำหรับเว็บที่ต้องการฝังหน้าค้นหาทัวร์ให้ใช้งานได้เร็วที่สุด.
<iframe
src="https://easytouragent.com/embed/tours?token=jt_widget_xxx"
width="100%"
height="720"
style="border:0"
></iframe>Widget tour list
ใช้สร้างกล่องค้นหาของตัวเองฝั่ง frontend ด้วย widget token.
GET https://easytouragent.com/api/widget/tours?token=jt_widget_xxx&limit=12&continent=asia&q=japanServer catalog API
ใช้จาก server ของเว็บลูกค้าเท่านั้น ห้ามฝัง jt_live key ใน browser.
GET https://easytouragent.com/api/tenant/catalog?limit=24&continent=europe
Authorization: Bearer jt_live_xxxTour details and departures
ใช้ slug หรือ UUID จาก catalog เพื่อเปิดรายละเอียดและรอบเดินทาง.
GET https://easytouragent.com/api/tenant/tours/{id}
Authorization: Bearer jt_live_xxx
GET https://easytouragent.com/api/tenant/tours/{id}/departures
Authorization: Bearer jt_live_xxxCreate booking
ส่ง booking กลับเข้าระบบกลาง พร้อม external_ref สำหรับ reconcile กับเว็บลูกค้า.
POST https://easytouragent.com/api/tenant/bookings
Authorization: Bearer jt_live_xxx
Content-Type: application/json
{
"tour_id": "japan-autumn-5d",
"departure_date": "2026-10-12",
"name": "Somchai Demo",
"phone": "0812345678",
"email": "somchai@example.com",
"adults": 2,
"payment_method": "reserve",
"external_ref": "WEB-ORDER-1001"
}ข้อควรจำก่อนเปิดจริง
ต้องตรวจราคา, รอบเดินทาง, ที่นั่ง, รูปภาพ และ PDF จาก supplier ก่อนส่งให้ลูกค้าใช้จริง. ถ้าใช้ widget ต้องตั้ง allowed origin เป็นโดเมนจริงของลูกค้า.