HUB
    HUB
    • Swagger
      • Tours
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
      • Auth
        • Cache flush
        • Change password
        • /auth/v1/login
        • Logout
        • Get me
        • /auth/v1/refresh-token
      • Cms
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
      • Rest
        • BearerAuth
      • Storage
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
      • Webhook
        • BasicAuth
      • Websocket
        • BearerAuth
    • Tested
      • 1. Get Providers
        GET
      • 2. Get Locations
        GET
      • 3. Get Routes
        GET
      • 4. Get Schedules
        GET
      • 5. Get Nations by Schedule ID
        GET
      • 6. Get Seats by Schedule ID
        GET
      • 7. Hold booking
        POST
      • 8. Comfirm booking
        POST
      • 9. Get Booking Detail
        GET
      • 10. Get List Booking
        GET
      • 11. Publish Ticket
        POST
      • 12. Cancel Ticket
        POST
      • 13. Update Ticket Info
        POST
    • Waterbuses
      • /waterbuses/providers
        GET
      • Get Providers
        GET
      • Booking Cancel
        POST
      • BasicAuth
        POST
      • BasicAuth
        POST
      • BasicAuth
        POST
      • BasicAuth
        POST
      • BasicAuth
        GET
      • BasicAuth
        GET
      • BasicAuth
        GET
      • BasicAuth
        GET
      • BasicAuth
        GET
      • BasicAuth
        GET
    • Swg new
      • Tours
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
      • Waterbuses
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
      • Auth
        • Cache flush
        • Change password
        • /auth/v1/login
        • Logout
        • Get me
        • /auth/v1/refresh-token
      • Cms
        • List audit logs
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • tennat
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
      • Rest
        • BearerAuth
      • Storage
        • BearerAuth
        • BearerAuth
        • BearerAuth
        • BearerAuth
      • Webhook
        • BasicAuth
      • Websocket
        • BearerAuth
    • swg 4
      • Tours
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
      • Waterbuses
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
        • BasicAuth
      • Auth
        • /auth/v1/cache-flush
        • /auth/v1/change-password
        • /auth/v1/login
        • /auth/v1/logout
        • /auth/v1/me
        • /auth/v1/refresh-token
      • Cms
        • /cms/v1/auditlogs
        • /cms/v1/balances
        • /cms/v1/balances
        • /cms/v1/clients
        • /cms/v1/clients
        • /cms/v1/clients/{client_id}
        • /cms/v1/cronjobs
        • /cms/v1/cronjobs/tours
        • /cms/v1/cronjobs/waterbuses
        • /cms/v1/cronjobs/{cronjob_id}
        • /cms/v1/customers
        • /cms/v1/customers/{customer_id}
        • /cms/v1/hubs/providers
        • /cms/v1/hubs/reports/balances/details
        • /cms/v1/hubs/reports/balances/summaries
        • /cms/v1/hubs/reports/waterbuses/balances/details
        • /cms/v1/hubs/reports/waterbuses/balances/summaries
        • /cms/v1/hubs/reports/waterbuses/bookings/details
        • /cms/v1/hubs/reports/waterbuses/bookings/summaries
        • /cms/v1/hubs/tenants
        • /cms/v1/providers
        • /cms/v1/providers/{provider_id}
        • /cms/v1/providers/{provider_id}
        • /cms/v1/roles
        • /cms/v1/roles
        • /cms/v1/roles/{role_id}
        • /cms/v1/roles/{role_id}
        • /cms/v1/settings/mail
        • /cms/v1/settings/mail
        • /cms/v1/settings/webhook
        • /cms/v1/settings/webhook
        • /cms/v1/tenants
        • /cms/v1/tenants
        • /cms/v1/tenants/balance
        • /cms/v1/tenants/reports/balances/details
        • /cms/v1/tenants/reports/balances/summaries
        • /cms/v1/tenants/reports/waterbuses/balances/details
        • /cms/v1/tenants/reports/waterbuses/balances/summaries
        • /cms/v1/tenants/reports/waterbuses/bookings/details
        • /cms/v1/tenants/reports/waterbuses/bookings/summaries
        • /cms/v1/tenants/{tenant_id}
        • /cms/v1/tenants/{tenant_id}
        • /cms/v1/tenants/{tenant_id}/reset-password
        • /cms/v1/tours/bookings
        • /cms/v1/tours/bookings/confirm
        • /cms/v1/tours/bookings/hold
        • /cms/v1/tours/bookings/{booking_id}
        • /cms/v1/tours/locations
        • /cms/v1/tours/prices-markup
        • /cms/v1/tours/prices-markup
        • /cms/v1/tours/prices-markup/{price_id}
        • /cms/v1/tours/providers
        • /cms/v1/tours/reports/summaries/bookings
        • /cms/v1/tours/routes
        • /cms/v1/tours/routes/{route_id}
        • /cms/v1/tours/routes/{route_id}
        • /cms/v1/tours/routes/{route_id}/change-status
        • /cms/v1/tours/schedules
        • /cms/v1/tours/schedules/{schedule_id}
        • /cms/v1/tours/schedules/{schedule_id}/change-status
        • /cms/v1/users
        • /cms/v1/users
        • /cms/v1/users/{user_id}
        • /cms/v1/users/{user_id}
        • /cms/v1/users/{user_id}/reset-password
        • /cms/v1/waterbuses/bookings
        • /cms/v1/waterbuses/bookings/cancel
        • /cms/v1/waterbuses/bookings/confirm
        • /cms/v1/waterbuses/bookings/hold
        • /cms/v1/waterbuses/bookings/publish
        • /cms/v1/waterbuses/bookings/update
        • /cms/v1/waterbuses/bookings/{booking_id}
        • /cms/v1/waterbuses/issues
        • /cms/v1/waterbuses/issues/{issue_id}
        • /cms/v1/waterbuses/issues/{issue_id}
        • /cms/v1/waterbuses/locations
        • /cms/v1/waterbuses/prices-markup
        • /cms/v1/waterbuses/prices-markup
        • /cms/v1/waterbuses/prices-markup/{price_id}
        • /cms/v1/waterbuses/prices-markup/{price_id}
        • /cms/v1/waterbuses/providers
        • /cms/v1/waterbuses/routes
        • /cms/v1/waterbuses/routes/{route_id}
        • /cms/v1/waterbuses/routes/{route_id}
        • /cms/v1/waterbuses/routes/{route_id}/change-status
        • /cms/v1/waterbuses/schedules
        • /cms/v1/waterbuses/schedules/{schedule_id}/nations
        • /cms/v1/waterbuses/schedules/{schedule_id}/seats
      • Rest
        • /rest/v1/metas
      • Storage
        • /storage/v1/images
        • /storage/v1/images/{filename}
        • /storage/v1/videos
        • /storage/v1/videos/{filename}
      • Webhook
        • BasicAuth
      • Websocket
        • /websocket/v1

    Tested

    Revision history#

    Version NumberAuthorExecutive summaryRelease Date
    V0.1BaoAnhFirst edition18/12/2024
    V0.2BaoAnhAdd Publish Ticket, Cancel Ticket, Update Ticket Info18/01/2025
    V0.3BaoAnhUpdate host

    Information Access#

    InformationValue
    Staginghttps://stg-api-hub.suntraveltech.com/agent/v1
    Usernameclient_id
    Passwordclient_serect
    Keysecure_key

    Request Header#

    HeaderDescription
    Content-Typeapplication/json
    Acceptapplication/json

    Response#

    HeadingType
    SuccessArray or Object
    FailObject
    Field NameDescription
    errorMã lỗi (xem bảng Error Code)
    error_descriptionThông tin mô tả lỗi

    Error Code#

    HTTP Status CodeErrorError Description
    500internal_server_errorCó lỗi hệ thống
    401unauthorizedChưa xác thực
    403forbiddenKhông có quyền truy cập
    400bad_requestDữ liệu không hợp lệ
    429too_many_requestYêu cầu quá nhiều
    400invalid_signatureChữ ký không hợp lệ
    404provider_not_foundNhà cung cấp không tìm thấy
    404provider_disabledNhà cung cấp không khả dụng
    404route_not_foundTuyến không tìm thấy
    404route_disabledTuyến không khả dụng
    404vehicle_not_foundPhương tiện không tìm thấy
    404schedule_not_foundLịch trình không tìm thấy
    404schedule_disabledLịch trình không khả dụng
    404seat_not_foundGhế không tìm thấy
    409seat_duplicateGhế bị trùng lặp
    404seat_canceledGhế đã bị hủy
    404seat_updatedGhế đã được cập nhật
    404seat_bookedGhế đã được đặt
    409seat_disabledGhế không không khả dụng
    400cancel_seat_too_lateKhông thể hủy ghế trước 48 giờ so với thời gian khởi hành
    400update_seat_too_lateKhông thể cập nhật thông tin hành khách trước 48 giờ so với thời gian khởi hành
    404price_not_foundGiá không tìm thấy
    404nation_not_foundQuốc gia không tìm thấy
    400balance_not_enoughKhông đủ số dư
    409request_id_conflictMã yêu cầu đã tồn tại
    409transaction_id_conflictMã giao dịch đã tồn tại
    404booking_not_foundĐơn hàng không tìm thấy
    409booking_conflictĐơn hàng đã tồn tại
    400booking_identity_conflictTrùng CMND/CCCD với hành khách đã đặt chỗ
    400booking_identity_duplicateCMND/CCCD hành khách bị trùng lặp
    400booking_paid_amount_incorrectSố tiền thanh toán không chính xác
    400booking_ticket_price_incorrectGiá vé không chính xác
    400booking_failTạo đơn hàng không thành công
    400booking_order_incorrectThông tin đơn hàng không chính xác
    400booking_provider_incorrectĐặt vé khứ hồi chỉ hỗ trợ cùng nhà cung cấp
    400booking_yob_incorrectNgày sinh không hợp lệ. Chỉ hỗ trợ mua vé cho người từ 6 tuổi trở lên
    400booking_child_unaccompaniedPhải có ít nhất 1 người người lớn đi cùng trẻ em
    400booking_unknownCác lỗi khác (không nằm trong danh sách lỗi đã liệt kê

    Pagination#

    Được lấy từ header response
    Filed nameTypeDescription
    x-pagination-totalnumberTổng số phần tử
    x-pagination-limitnumberSố phần tử trên mỗi trang
    x-pagination-pagenumberTrang hiện tại

    Lưu ý:#

    LoạiChi tiếtNote
    Hạng vé: vip, eco, deluxe- Vip: Hạng VIP
    vd: V012: Khu vực Vip ghế 12
    - Eco: Hạng thường
    vd: G13: Ghế thuờng hàng 13 cột G
    - Deluxe: Hạng Deluxe
    vd: DL05: Ghế duluxe hàng 5 cột L
    Hàng Deluxe: Chỉ cóở tuyến HCM - CĐ, mà hiện giờ đang off
    Loại vé: adults, children, elderly- baby < 6 tuổi: miễn phí (không cần booking vé)
    - children 6-12 tuổi
    - adult 13-59 tuổi
    - elderly >59 tuổi
    - 1 Children phải đi chung với 1 elderly
    Total amount: Tổng cộng- Ticket mount: Giá vé theo bảng giá của PQE
    - Fee habor: Phí theo bảng phí của cảng
    QR codeI1Q1CP5LRKK4RGL8QZ674KEWWQ3NZ5L1$TD-CD*02/03/2025 06:30__NGUYEN VAN GUEST 1L_12*_079012345680Format QRcode từ Nhà cung cấp trả về
    BalanceSố dư tài khoản đại lý (tenant)Sẽ được setup trước khi sử dụng API (1.000.000.000 vnd)
    Booking- hệ thống sẽ tạm giữ số tiền theo hold booking
    - Status of booking:
    + holding: Sau khi gửi yêu cầu đặt vé thành công
    + expired: Quá hạn thanh toán
    + paid: Đã thanh toán
    + canceled: booking bị huỷ
    + failed: booking lỗi
    - Thời gian hold là: 20 phút
    - Sau đó, nếu không comfirm booking, số tiền tạm giữ sẽ được hoàn lại balance
    Publish ticketCho phép Xuất vé khi :
    + Payment thành công (1 lần)
    + Update thông tin vé (1 lần)
    - Không có giới hạn thời gian xuất vé
    Booking codeMã tham chiếu booking với nhà cung cấpvd: Book 1 chiều là 123
    Book 2 chiều 123-124
    Publish ticketCho phép Xuất vé khi :
    + Payment thành công (1 lần)
    + Update thông tin vé (1 lần)
    - Không có giới hạn thời gian xuất vé
    Request_idMã tham chiếu (unique) do đối tác tự quy định để tra cứu
    Transaction_idMã tham chiếu (unique) do đối tác tự quy định để tra cứu
    Update Ticket InfoMỗi guest được yêu cầu đổi tên và CCCD 1 lần miễn phí (theo Quy định của nhà cung cấp)Đại lý sẽ tạo request để HUB xử lý thông tin này với nhà cung cấp
    Cancel TicketGuest có thể yêu cầu huỷ ghế hoặc huỷ booking bị 1 khoản mất phí (theo Quy định của nhà cung cấp)Đại lý sẽ tạo request để HUB xử lý thông tin này với nhà cung cấp
    Modified at 2025-03-13 08:16:03
    Previous
    BearerAuth
    Next
    1. Get Providers
    Built with