Skip to main content

Routes & API Hooks

Backoffice route map

ModuleRoutesAPI/service
Login/loginAuth0 / NextAuth
Booking/booking, /booking/[id], /booking/edit/[id]booking-service/bookings, catalog-service/public/*, payment-service/*
Customer/customer, /customer/[id]user-service/customers, groups, tiers, activation history
Refund/refund, /refund/[id]booking-service/refunds
Car/car, /car/[id], /car/edit/[id]catalog-service/cars, image upload
Promotion/promotion, /promotion/[id], /promotion/edit/[id]catalog-service/promotions, upload/sort
Add-on/add-on, /add-on/[id], /add-on/edit/[id]catalog-service/add-ons, options, sort
Fuel/fuelcatalog-service/fuels
OWR/one-way-rental, create/edit/detailcatalog-service/oneway-rentals
Branch/branch, detail/editcatalog-service/branches, image upload
Term & Policy/term-and-policy/for-register, /for-bookingUser register policies, Booking term policies
User/user, create/edit/detailuser-service/users, roles
Role/role, create/edit/detailuser-service/roles
My Profile/my-profile, edituser-service/users/me

Customer Web route map

ModuleRoutesAPI/service
Home/Search/, /search-resultcatalog-service/public/search, branches, search attributes
Booking create/bookingpublic add-ons, booking policies, create booking, payment initiate
Booking detail/manage/booking/[id], /my-bookings, /booking/managebooking-service/customer-bookings, booking-service/bookings
Booking edit/booking/edit/[id]update booking, restart payment, edit refund
Payment result/booking/payment-success/[id]booking/payment status
Terms/privacy/booking/term-condition/[slug], /booking/privacy-policy/[slug]booking public policy endpoints
Login/loginpasswordless, social, callback, userinfo
Profile/profileuser-service/me/profile (get profile, update info/email/phone, verify OTP)
Branches/branchespublic branches list
Promotions/promotionspublic promotions
Contact us/about/contact-ususer-service/public/contact-us

Hook/API map ที่สำคัญ

Hook/AreaEndpoint
post-public-searchPOST /catalog-service/public/search
post-public-request-carPOST /catalog-service/public/request-car
get-public-branchesGET /catalog-service/public/branches
get-public-search-attributesGET /catalog-service/public/search-attributes
get-public-add-onsGET /catalog-service/public/add-ons
post-public-bookingPOST /booking-service/public/booking
post-public-booking-memberPOST /booking-service/customer-bookings
put-booking-by-idPUT /booking-service/bookings/{id}
put-booking-idPUT /booking-service/customer-bookings/{id}
post-payments-initiatePOST /payment-service/public/payments/initiate
post-payments-initiate-memberPOST /payment-service/payments/initiate
use-payment-subscribeGET /payment-service/payments/{transactionId}/subscribe
get-contact / post-contactGET/PUT /user-service/me/contact
use-get-profileGET /user-service/me/profile
use-update-personal-infoPUT /user-service/me/personal-info (รวมฟิลด์ใบขับขี่ DriverLicenseNumber, DriverLicenseExpiry)
use-update-emailPUT /user-service/me/email
use-update-phonePUT /user-service/me/phone
use-check-email-availabilityGET /user-service/me/email/check
use-check-phone-availabilityGET /user-service/me/phone/check
register-policy-consent-apiGET /user-service/me/register-policies/consent, POST /me/accept-register-policies

Image handling

Use caseEndpoint
Car image upload/api/proxy/catalog-service/images/car/upload
Branch image upload/api/proxy/catalog-service/images/branch/upload
Promotion image upload/api/proxy/catalog-service/images/promotion/upload
Term/register image upload/api/proxy/catalog-service/images/terms-and-policy-for-register/upload
Booking bank book upload/api/proxy/booking-service/images/booking/upload
Signed URLPOST /images/signed-url หรือ POST /public/signed-url ตาม context