Tourwell Open APIs
  1. v1
Tourwell Open APIs
  • Tổng quan
  • Hướng dẫn xác thực
  • API Zalo Mini App (Beta)
  • Khách hàng
    • v1
      • Get by id
      • Get all customer
      • Create customer
      • Update customer
      • Get order history
  • Đơn hàng
    • v1
      • Get by id
        GET
      • Get all order
        GET
      • Create order tour
        POST
      • Create order product
        POST
      • Create order hotel
        POST
      • Create order flight
        POST
      • Confirm payment order
        POST
      • Cancel order
        POST
  • Sản phẩm
    • v1
      • Create product
      • Get by id
      • Calendar pricing
      • Get all product
      • Get schedule by id
  • Lịch khởi hành
  • Lead (Cơ hội)
    • v1
      • Get all lead
      • Get by id
      • Create lead
      • Update lead
  • Khách sạn
    • v1
      • Get all hotel
      • Get by id
  • Kế toán
    • Phiếu thu
      • v1
        • Get all receipt
        • Create receipt
    • Phiếu chi
      • v1
        • Get all payment
        • Confirm Payment
    • Hóa đơn
      • Update invoice
      • Issue Invoice
      • Get by id
      • Cancel invoice
  • Cấu hình
    • Zalo ZNS
      • Danh sách Tag
      • Get token
    • Địa điểm
      • Search
    • Nhân sự nội bộ
      • Search
    • Webhook
      • Hướng dẫn cài đặt
    • Trạng thái khách hàng
      • Get All
    • Loại dịch vụ
    • Mã sân bay
      • Get All Airport
  • Hướng dẫn tích hợp
    • Hướng dẫn tích hợp thanh toán trực tuyến qua Website và Tourwell
    • Hướng dẫn tích hợp thanh toán trực tuyến qua Website, Cổng thanh toán và Tourwell
  1. v1

Create order flight

POST
/api/v1/orders/flights
Flight Booking API cung cấp các endpoint để tạo và quản lý đơn hàng dịch vụ vé máy bay.
API này được thiết kế hỗ trợ cả vé một chiều và vé khứ hồi, cho phép khai báo nhiều quy tắc giá, xử lý VAT, cũng như cấu hình hoa hồng cho đối tác.
Với API này, các hệ thống đại lý hoặc nền tảng đặt vé có thể:
Thu thập thông tin khách hàng (họ tên, số điện thoại, email).
Xác định thông tin hành trình bao gồm ngày đi, ngày về, loại hành trình (một chiều/khứ hồi), sân bay đi và sân bay đến.
Quản lý mã dịch vụ và ghi chú ở cấp dịch vụ hoặc cấp đơn hàng.
Thiết lập bảng giá chi tiết gồm đơn giá, số lượng, VAT, mô tả, đơn vị tính và hoa hồng đối tác.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json

Example
{
    "contact_name": "Upwell",
    "contact_phone": "0988777555",
    "contact_email": "contact@upwell.vn",
    "service_id": 8,
    "depart_date": "20/09/2025",
    "return_date": "21/09/2025",
    "round_trip": 1,
    "departure_airport_id": 1,
    "destination_airport_id": 2,
    "service_codes": "CODE1,CODE2",
    "note_service": "Ghi chú dịch vụ",
    "note_order": "Ghi chú đơn hàng",
    "source_id": 1,
    "branch_office_id": 1,
    "vat_type": "not-vat",
    "discount_type": 1,
    "discount_value": 1000000,
    "discount_note": "Giảm giá theo CTKM",
    "pricing": [
        {
            "price_rule_id": 1,
            "price": 200000,
            "quantity": 1,
            "period": 1,
            "vat": {
                "type": "percent",
                "amount": 0
            },
            "description": "",
            "unit": "pax",
            "com_partner": "20000"
        },
        {
            "price_rule_id": 1,
            "price": 200000,
            "quantity": 1,
            "period": 1,
            "vat": {
                "type": "percent",
                "amount": 0
            },
            "description": "",
            "unit": "pax"
        },
        {
            "price_rule_id": 0,
            "price": 200000,
            "quantity": 1,
            "period": 1,
            "vat": {
                "type": "percent",
                "amount": 0
            },
            "description": "Trẻ em",
            "unit": "pax"
        }
    ]
}

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://demo.tourwell.net/api/v1/orders/flights' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "contact_name": "Upwell",
    "contact_phone": "0988777555",
    "contact_email": "contact@upwell.vn",
    "service_id": 8,
    "depart_date": "20/09/2025",
    "return_date": "21/09/2025",
    "round_trip": 1,
    "departure_airport_id": 1,
    "destination_airport_id": 2,
    "service_codes": "CODE1,CODE2",
    "note_service": "Ghi chú dịch vụ",
    "note_order": "Ghi chú đơn hàng",
    "source_id": 1,
    "branch_office_id": 1,
    "vat_type": "not-vat",
    "discount_type": 1,
    "discount_value": 1000000,
    "discount_note": "Giảm giá theo CTKM",
    "pricing": [
        {
            "price_rule_id": 1,
            "price": 200000,
            "quantity": 1,
            "period": 1,
            "vat": {
                "type": "percent",
                "amount": 0
            },
            "description": "",
            "unit": "pax",
            "com_partner": "20000"
        },
        {
            "price_rule_id": 1,
            "price": 200000,
            "quantity": 1,
            "period": 1,
            "vat": {
                "type": "percent",
                "amount": 0
            },
            "description": "",
            "unit": "pax"
        },
        {
            "price_rule_id": 0,
            "price": 200000,
            "quantity": 1,
            "period": 1,
            "vat": {
                "type": "percent",
                "amount": 0
            },
            "description": "Trẻ em",
            "unit": "pax"
        }
    ]
}'

Responses

🟢201Created
application/json
Body

Example
{"success":true,"message":"The order created successfully","data":{"id":913,"code":"UP1913","link_erp":"{host}/admin/order/913/show"}}
Modified at 2025-10-02 08:54:50
Previous
Create order hotel
Next
Confirm payment order
Built with