HUB
  1. Tested
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
  1. Tested

7. Hold booking

Testing Env
https://stg-api-hub.suntraveltech.com
Testing Env
https://stg-api-hub.suntraveltech.com
POST
https://stg-api-hub.suntraveltech.com
/waterbuses/bookings/hold
Last modified:2025-03-09 19:18:18
Maintainer:Not configured
API gửi yêu cầu đặt vé.

Parameters#

Field nameTypeRequiredDescription
is_round_tripbooleanyesTuỳ chọn mua vé khứ hồi
- True: 2 chiều
- False: 1 chiều
ordersarrayThông tin đơn hàng
orders[0].booker_infoobjectyesThông tin người đặt vé
- orders[0] Chiều đi
- orders[1] Chiều về
orders[0].booker_info.addressstringnoĐịa chỉ
orders[0].booker_info.bookerstringyesHọ và tên
orders[0].booker_info.emailstringyesEmail
orders[0].booker_info.phonestringyesĐiện thoại
orders[0].schedule_idstringyesMã lịch trình
orders[0].ticket_infosarrayyesThông tin hành khách
orders[0].ticket_infos[0].full_nmstringyesHọ và tên
orders[0].ticket_infos[0].genderstringyesGiới tính
orders[0].ticket_infos[0].emailstringnoEmail
orders[0].ticket_infos[0].phonestringnoĐiện thoại
orders[0].ticket_infos[0].yobstringyesNgày sinh
orders[0].ticket_infos[0].nation_idstringyesMã Quốc gia, lấy từ API get nations
orders[0].ticket_infos[0].ticket_price_idstringyesMã giá vé, lấy từ API get seats
orders[0].ticket_infos[0].seat_idstringyesMã chỗ ngồi, lấy từ API get seats
request_idstringyesMã tham chiếu để tạo yêu cầu giữ chỗ được tạo từ phía đối tác
signaturestringyesclient_Id+request_Id
key = securekey

Signature Example#

https://tools.onecompiler.com/hmac-sha512
client_Id : rci_e51db537-5dcf-4055-b138-21fbeb4610f9
request_Id : request_id_20250219
securekey rsk_7fd14b85-d703-4d2b-a9fa-21926e7817ef
signature : 6a1496b16fc266f433f1af7b71e52e26b2455c3388664df6ce12eb5007f0fd0878baef608dc1c168cb8f4d09e730130f501afc74efd9daee808663971b3a12f3

Response Description#

Field nameTypeDescription
booking_idstringMã đặt chỗ
request_idstringMã tham chiếu để tạo yêu cầu giữ chỗ được tạo từ phía đối tác
statusstringTrạng thái của đặt chỗ: request, holding, canceled, paid, failed
fee_amountnumberTổng cộng các loại phí
ticket_amountnumberTổng cộng giá vé
total_amountnumberTổng cộng số tiền phải thanh toán
Lưu ý:
Sau khi gửi yêu cầu đặt vé thành công, Trạng thái đơn hàng sẽ là holding
API này sẽ tiến hành giữ chỗ để khách hàng thực hiện thanh toán trong vòng 15 phút (theo quy định của nhà cung cấp)
Sau 15 phút, nếu đơn hàng:
chưa được thanh toán, Trạng thái đơn hàng sẽ là canceled
thanh toán thành công, Trạng thái đơn hàng sẽ là paid

Request

Authorization
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
Body Params application/json

Example
{
    "is_round_trip": false,
    "orders": [
        {
            "booker_info": {
                "address": "Hồ Chí Minh",
                "booker": "Nguyen Thi Test", //Tên người đặt vé
                "buyer": "Nguyễn Văn Book", // Tên người đặt vé trên hoá đơn VAT 
                "company_addr": "Hồ Chí Minh", // Địa chỉ công ty trên hoá đơn VAT
                "company_nm": "Công ty Việt Nam", // Tên công ty trên hoá đơn VAT
                "email": "bpoker@gmail.com", //email người đặt vé
                "phone": "0973123456", // số điện thoại người đặt vé
                "taxcode": "3212442210" //Mã số thuế
            },
            "schedule_id": "67aaf75d072c910c5069e3b2",
            "ticket_infos": [
                {
                    "email": "guest1@gmail.com",
                    "full_nm": "Nguyễn Văn Guest 1",
                    "gender": "male",
                    "id_no": "079012345680",
                    "nation_id": "67aaf6c86d975d8237cc8aab",
                    "phone": "0973123456",
                    "pob": "Hồ Chí Minh",
                    "seat_id": "67b2be31bf0a57532e0678c2",
                    "ticket_price_id": "67aaf75d072c910c5069e3b3", 
                    "yob": "1950-01-02"
                },
                {
                    "email": "guest2@gmail.com",
                    "full_nm": "Nguyễn Văn Guest 2",
                    "gender": "male",
                    "id_no": "079112345680",
                    "nation_id": "67aaf6c86d975d8237cc8aab",
                    "phone": "0973123456",
                    "pob": "Hồ Chí Minh",
                    "seat_id": "67b2be31bf0a57532e0678c0",
                    "ticket_price_id": "67aaf75d072c910c5069e3b5",
                    "yob": "1950-01-02"
                }
            ]
        }
    ],
    "request_id": "request_id_20250220", //Mã request tự quy định
    "signature": "e7580c8f8002f133c15cbe5ed71503a475024ac1546362c914cfa4b8f289aceb02d477767e0de2e9337b71a07718fd6c03877bef60d460f95f3399135eb9bca9"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://stg-api-hub.suntraveltech.com/waterbuses/bookings/hold' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "is_round_trip": false,
    "orders": [
        {
            "booker_info": {
                "address": "Hồ Chí Minh",
                "booker": "Nguyen Thi Test", //Tên người đặt vé
                "buyer": "Nguyễn Văn Book", // Tên người đặt vé trên hoá đơn VAT 
                "company_addr": "Hồ Chí Minh", // Địa chỉ công ty trên hoá đơn VAT
                "company_nm": "Công ty Việt Nam", // Tên công ty trên hoá đơn VAT
                "email": "bpoker@gmail.com", //email người đặt vé
                "phone": "0973123456", // số điện thoại người đặt vé
                "taxcode": "3212442210" //Mã số thuế
            },
            "schedule_id": "67aaf75d072c910c5069e3b2",
            "ticket_infos": [
                {
                    "email": "guest1@gmail.com",
                    "full_nm": "Nguyễn Văn Guest 1",
                    "gender": "male",
                    "id_no": "079012345680",
                    "nation_id": "67aaf6c86d975d8237cc8aab",
                    "phone": "0973123456",
                    "pob": "Hồ Chí Minh",
                    "seat_id": "67b2be31bf0a57532e0678c2",
                    "ticket_price_id": "67aaf75d072c910c5069e3b3", 
                    "yob": "1950-01-02"
                },
                {
                    "email": "guest2@gmail.com",
                    "full_nm": "Nguyễn Văn Guest 2",
                    "gender": "male",
                    "id_no": "079112345680",
                    "nation_id": "67aaf6c86d975d8237cc8aab",
                    "phone": "0973123456",
                    "pob": "Hồ Chí Minh",
                    "seat_id": "67b2be31bf0a57532e0678c0",
                    "ticket_price_id": "67aaf75d072c910c5069e3b5",
                    "yob": "1950-01-02"
                }
            ]
        }
    ],
    "request_id": "request_id_20250220", //Mã request tự quy định
    "signature": "e7580c8f8002f133c15cbe5ed71503a475024ac1546362c914cfa4b8f289aceb02d477767e0de2e9337b71a07718fd6c03877bef60d460f95f3399135eb9bca9"
}'

Responses

🟢200Succcess
application/json
Body

Example
{
    "booking_id": "67b2c564bf0a57532e067a81",
    "request_id": "request_id_20250219",
    "status": "holding",
    "fee_amount": 36000,
    "ticket_amount": 900000,
    "total_amount": 936000
}
Modified at 2025-03-09 19:18:18
Previous
6. Get Seats by Schedule ID
Next
8. Comfirm booking
Built with