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
      • Get destinations
      • Get guests
      • Get by id care history
      • Create company
      • Get all care history
      • Get all company
  • Đơn hàng
    • v1
      • Get by id
        GET
      • Get all order
        GET
      • Get Passengers 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
      • Create cost order
        POST
      • Update cost order
        PATCH
      • Delete cost order
        DELETE
      • Create order multiple services
        POST
      • Add services to order.
        POST
  • Điều hành
    • v1
      • Overview
      • Create row cost
      • Update row cost
      • Delete row cost
  • 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
  • Nhà cung cấp
    • v1
      • Get all suppliers
      • Get suppliers products
      • Get all tour guides
      • Create Supplier & Hotel
      • Create Prices Suppliers products
      • Append Prices Hotel
  • 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
  • Báo giá
    • v1
      • Get all
      • Update schedules
      • Update policy
  • 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 bán ra
      • Update invoice
      • Issue Invoice
      • Get by id
      • Cancel invoice
    • Hóa đơn mua vào
      • Import
  • Phê duyệt
    • v1
      • Overview
      • Summary
      • Approvals
  • 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
    • Hạng thành viên
      • Get All
    • Loại dịch vụ
    • Mã sân bay
      • Get All Airport
    • Phương thức thanh toán
      • Get All
    • Nguồn bán hàng
      • Get All
    • Phễu chuyển đổi lead
      • Trạng thái lead
      • Trạng thái báo giá
  • 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
  • MCP
    • Hướng dẫn kết nối
  1. v1

Create order multiple services

POST
/api/v1/orders
Tạo một đơn hàng gồm nhiều dịch vụ (tour theo lịch khởi hành, vé tham quan, vé máy bay, khách sạn, combo…).
Mỗi phần tử trong items có cùng cấu trúc với các API tạo đơn một dịch vụ (Create order tour / product / hotel).
Tối đa 10 dịch vụ mỗi request.
Request được xử lý trọn vẹn: nếu một dịch vụ lỗi, không có đơn hàng nào được tạo.
Khách hàng được tự động tạo mới nếu chưa tồn tại (theo số điện thoại / email).
Dịch vụ có tour_id: hệ thống tự lấy ngày khởi hành, sản phẩm, loại dịch vụ và áp dụng thời gian giữ chỗ của lịch khởi hành.
Nếu lịch khởi hành bật không cho vượt chỗ, hệ thống kiểm tra số chỗ còn lại (cộng gộp các dịch vụ cùng lịch).
Truyền order_code để tránh tạo trùng khi gửi lại request: mã đã tồn tại trả về 409.
Định dạng ngày: dd/mm/yyyy.
ID loại dịch vụ, sân bay, sản phẩm, lịch khởi hành khác nhau theo từng hệ thống: lấy qua GET /api/v1/services, GET /api/v1/airports, GET api/v1/products, GET /api/v1/tours.
items[].id trong response dùng cho API giá net Create cost order (POST /api/v1/order-items/{item_id}/costs).
Header bắt buộc: Content-Type: application/json

Request

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

Example
{
  "contact_name": "Nguyễn Văn A",
  "contact_phone": "0901234567",
  "contact_email": "nguyenvana@example.com",
  "order_code": "WEB-000123",
  "source_id": 3,
  "branch_office_id": 1,
  "follower_email": "sale01@company.vn",
  "note_order": "Khách đặt qua website",
  "discount_type": 1,
  "discount_value": 200000,
  "discount_note": "Mã giảm giá WEB200",
  "mark_as_success": 0,
  "items": [
    {
      "tour_id": 120,
      "passenger_note": "2 người lớn",
      "pricing": [
        {
          "price_rule_id": 5,
          "price": 5000000,
          "quantity": 2
        }
      ]
    },
    {
      "service_id": 6,
      "product_id": 88,
      "depart_date": "20/11/2026",
      "note_service": "Vé vào cổng buổi sáng",
      "pricing": [
        {
          "price": 300000,
          "quantity": 2,
          "description": "Vé người lớn"
        }
      ]
    },
    {
      "service_id": 8,
      "departure_airport_id": 1,
      "destination_airport_id": 5,
      "depart_date": "20/11/2026",
      "return_date": "25/11/2026",
      "round_trip": 1,
      "service_codes": "VN213 / VN220",
      "pricing": [
        {
          "price": 2500000,
          "quantity": 2,
          "description": "Vé người lớn khứ hồi",
          "vat": {
            "amount": 8
          }
        }
      ]
    }
  ]
}

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 'https://demo.tourwell.net/api/v1/orders' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "contact_name": "Nguyễn Văn A",
  "contact_phone": "0901234567",
  "contact_email": "nguyenvana@example.com",
  "order_code": "WEB-000123",
  "source_id": 3,
  "branch_office_id": 1,
  "follower_email": "sale01@company.vn",
  "note_order": "Khách đặt qua website",
  "discount_type": 1,
  "discount_value": 200000,
  "discount_note": "Mã giảm giá WEB200",
  "mark_as_success": 0,
  "items": [
    {
      "tour_id": 120,
      "passenger_note": "2 người lớn",
      "pricing": [
        {
          "price_rule_id": 5,
          "price": 5000000,
          "quantity": 2
        }
      ]
    },
    {
      "service_id": 6,
      "product_id": 88,
      "depart_date": "20/11/2026",
      "note_service": "Vé vào cổng buổi sáng",
      "pricing": [
        {
          "price": 300000,
          "quantity": 2,
          "description": "Vé người lớn"
        }
      ]
    },
    {
      "service_id": 8,
      "departure_airport_id": 1,
      "destination_airport_id": 5,
      "depart_date": "20/11/2026",
      "return_date": "25/11/2026",
      "round_trip": 1,
      "service_codes": "VN213 / VN220",
      "pricing": [
        {
          "price": 2500000,
          "quantity": 2,
          "description": "Vé người lớn khứ hồi",
          "vat": {
            "amount": 8
          }
        }
      ]
    }
  ]
}'

Responses

🟢200Success
application/json
Bodyapplication/json

Example
{
    "success": true,
    "message": "The order created successfully",
    "data": {
        "id": 1728,
        "code": "UP1728",
        "link_erp": "https://your-domain.tourwell.vn/admin/order/1728/show",
        "total_amount": 15400000,
        "items": [
            {
                "id": 2308,
                "type_of_service_id": 10,
                "tour_id": 120,
                "item_id": 0,
                "hold_info": {
                    "keep_at": "2026-10-22 10:15:00",
                    "keep_rule": 24
                }
            },
            {
                "id": 2309,
                "type_of_service_id": 6,
                "tour_id": 0,
                "item_id": 88
            },
            {
                "id": 2310,
                "type_of_service_id": 8,
                "tour_id": 0,
                "item_id": 0
            }
        ]
    }
}
Modified at 2026-10-21 03:03:12
Previous
Delete cost order
Next
Add services to order.
Built with