1. v1
Tourwell Open APIs
  • Tổng quan
  • Hướng dẫn xác thực
  • API Zalo Mini App (Beta)
  • API Changelog
  • Error Response
  • 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
      • Import Order Flight
        POST
  • Sản phẩm
    • v1
      • Create product
      • Get by id
      • Calendar pricing
      • Get all product
      • Get schedule by id
      • Update product
  • Chiết tinh giá
    • v1
      • Overview
  • Nhà cung cấp
    • v1
      • Get & Search suppliers
      • Get suppliers products
  • Lịch khởi hành
    • v1
      • Get all tour
      • Create tour
  • Lead (Cơ hội)
    • Overview
    • Update History
    • 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
        • Update receipt
        • Confirm Receipt Success
    • 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

Import Order Flight

POST
/api/v1/orders/flight-import
API Import/Đồng bộ Đơn Vé Máy Bay
Dùng khi App muốn đẩy đơn hàng đã xuất vé thành công vào ERP để đồng bộ vận hành
Hệ thống API sử dụng mô hình Nested JSON để truyền tin và tự động bóc tách thành nhiều đối tượng vé khi đưa vào lưu trữ.

Request

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

Example
{
  "pnr": "VNX123",
  "ticket_type": "Khứ hồi",
  "airline": "VN",
  "from": "SGN",
  "to": "HAN",
  "depart_date": "20/12/2026",
  "return_date": "25/12/2026",
  "passengers": "Nguyen Van A, Tran Thi B",
  "sale_staff": "nguyen@domain.com",
  "sale_source": "App Vệ Tinh",
  "operator_staff": "tran@domain.com",
  "customer": {
    "type": "Cá nhân",
    "booker_name": "Nguyen Van A",
    "booker_phone": "0901234567",
    "booker_email": "a@gmail.com",
    "company_name": "",
    "company_tax_code": "",
    "paid_amount": 5000000,
    "paid_date": "15/12/2026",
    "payment_method": "Chuyển khoản",
    "payment_ref": "CK123456",
    "receive_account": "VCB-12345"
  },
  "supplier": {
    "supplier_name": "Đại lý vé máy bay cấp 1",
    "supplier_code": "DL-VMB01",
    "paid_amount": 4000000,
    "paid_date": "15/12/2026",
    "payment_method": "Chuyển khoản"
  },
  "advanced_flight_info": {
    "itinerary_detail": "SGN-HAN-SGN",
    "flight_codes": "VN200, VN201",
    "depart_time": "08:00",
    "arrive_time": "10:15",
    "ticket_issued_date": "15/12/2026",
    "ticket_deadline": "16/12/2026",
    "ticket_service_status": "Đã xuất vé",
    "note": "Ghi chú chuyến bay"
  },
  "prices": [
    {
      "ticket_no": "738-123456789",
      "pricing_object": "Người lớn",
      "qty": 2,
      "unit_price": 2500000,
      "net_price": 2000000,
      "other_fee": 0,
      "sale_price": 2500000,
      "sale_tax_rate": "0%",
      "sale_tax_amount": 0
    }
  ]
}

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/flight-import' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "pnr": "VNX123",
  "ticket_type": "Khứ hồi",
  "airline": "VN",
  "from": "SGN",
  "to": "HAN",
  "depart_date": "20/12/2026",
  "return_date": "25/12/2026",
  "passengers": "Nguyen Van A, Tran Thi B",
  "sale_staff": "nguyen@domain.com",
  "sale_source": "App Vệ Tinh",
  "operator_staff": "tran@domain.com",
  "customer": {
    "type": "Cá nhân",
    "booker_name": "Nguyen Van A",
    "booker_phone": "0901234567",
    "booker_email": "a@gmail.com",
    "company_name": "",
    "company_tax_code": "",
    "paid_amount": 5000000,
    "paid_date": "15/12/2026",
    "payment_method": "Chuyển khoản",
    "payment_ref": "CK123456",
    "receive_account": "VCB-12345"
  },
  "supplier": {
    "supplier_name": "Đại lý vé máy bay cấp 1",
    "supplier_code": "DL-VMB01",
    "paid_amount": 4000000,
    "paid_date": "15/12/2026",
    "payment_method": "Chuyển khoản"
  },
  "advanced_flight_info": {
    "itinerary_detail": "SGN-HAN-SGN",
    "flight_codes": "VN200, VN201",
    "depart_time": "08:00",
    "arrive_time": "10:15",
    "ticket_issued_date": "15/12/2026",
    "ticket_deadline": "16/12/2026",
    "ticket_service_status": "Đã xuất vé",
    "note": "Ghi chú chuyến bay"
  },
  "prices": [
    {
      "ticket_no": "738-123456789",
      "pricing_object": "Người lớn",
      "qty": 2,
      "unit_price": 2500000,
      "net_price": 2000000,
      "other_fee": 0,
      "sale_price": 2500000,
      "sale_tax_rate": "0%",
      "sale_tax_amount": 0
    }
  ]
}'

Responses

🟢200
application/json
Body

Example
{
    "success": true,
    "message": "Tạo đơn hàng vé máy bay thành công",
    "data": {
        "orders": [
            1494
        ]
    }
}
Modified at 2026-04-08 08:51:51
Previous
Cancel order
Next
Sản phẩm
Built with