Skip to main content

Booking API Reference

Public API

MethodPathรายละเอียด
POST/public/bookingสร้าง booking จาก customer web
GET/public/cancellation-reasonsดึงเหตุผลการยกเลิก
GET/public/booking/term-condition/{slug?}ดึง term condition
GET/public/booking/privacy-policy/{slug?}ดึง privacy policy

Customer Booking API

MethodPathรายละเอียด
POST/customer-bookings/searchSearch car ใน booking flow
POST/customer-bookingsสร้าง booking แบบ customer context
GET/customer-bookingsรายการ booking ของ customer
GET/customer-bookings/{id}รายละเอียด booking
PUT/customer-bookings/{id}แก้ไข booking
PATCH/customer-bookings/{id}/statusเปลี่ยนสถานะ
PATCH/customer-bookings/{id}/cancelยกเลิก booking
PATCH/customer-bookings/{id}/restart-paymentเริ่ม payment ใหม่
PATCH/customer-bookings/{id}/cancel-editยกเลิก edit session
POST/customer-bookings/{id}/edit-refundสร้าง refund จากการ edit
GET/customer-bookings/{id}/cancel-infoข้อมูลประกอบการยกเลิก booking ของ customer

Backoffice API

MethodPathรายละเอียด
GET/bookingsList booking
GET/bookings/{id}Booking detail
GET/bookings/{id}/history/{historyId}History detail
PUT/bookings/{id}Update booking
PATCH/bookings/{id}/statusUpdate booking status
GET/bookings/{id}/cancel-infoข้อมูลประกอบการยกเลิก
PATCH/bookings/{id}/cancelCancel booking
PATCH/bookings/{id}/restart-paymentRestart payment
PATCH/bookings/{id}/cancel-editCancel edit
POST/bookings/{id}/edit-refundCreate edit refund

Term & Policy API

MethodPathรายละเอียด
GET/term-policies/bookingList booking term/privacy policies
POST/term-policies/bookingCreate draft policy
GET/term-policies/booking/{id}Policy detail
PUT/term-policies/booking/{id}Update policy
DELETE/term-policies/booking/{id}Delete/archive policy
POST/term-policies/booking/activateActivate policy version

Refund API

MethodPathรายละเอียด
GET/refundsPaginated refund list
GET/refunds/{refundId}Refund detail
PATCH/refunds/{refundId}/statusUpdate refund workflow status

Image API

MethodPathรายละเอียด
POST/images/booking/uploadUpload booking-related image เช่น bank book
POST/images/signed-urlสร้าง signed URL สำหรับดูไฟล์

Response pattern

ทุก service ใช้ response wrapper แนวเดียวกัน:

Typeใช้เมื่อ
BaseResponseoperation ไม่มี data
BaseResponse<T>operation มี data
PaginatedBaseResponse<T> / PaginatedResponse<T>list พร้อม pagination
ValidationErrorResponseFluentValidation fail