Tourwell Open APIs
  1. v1
Tourwell Open APIs
  • Tổng quan
  • Hướng dẫn xác thực
  • API Beta 1.0
  • 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
      • Confirm payment order
        POST
  • Sản phẩm
    • v1
      • Create product
      • Get by id
      • Calendar pricing
  • 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
    • 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ụ
  1. v1

Create order tour

POST
/api/v1/orders/tours
Đơn hàng giữ chỗ

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
contact_name
string 
required
Tên khách hàng
contact_phone
string 
required
Số điện thoại khách
contact_email
string 
optional
Email khách hàng
tour_id
integer 
required
ID Tour từ CRM
note_order
string 
optional
Ghi chú đơn hàng
source_id
integer 
optional
ID nguồn từ CRM
branch_office_id
integer 
optional
ID chi nhánh từ CRM
vat_type
string 
optional
Có VAT hoặc không VAT. Giá trị quy định (inc-vat: có VAT, not-vat: chưa VAT). Không nhập mặc định là chưa VAT
pricing
array [object {7}] 
optional
Bảng đơn giá theo đối tượng
price_rule_id
integer 
required
ID đối tượng tính giá
price
integer 
required
Đơn giá
quantity
integer 
required
Số lượng
period
integer 
required
Số lần
vat
object 
required
VAT
description
string 
required
Tên đối tượng tự nhập nếu không có ID đối tượng tính gia
unit
string 
required
Đơn vị
Example
{
    "contact_name": "Upwell",
    "contact_phone": "0988777555",
    "contact_email": "contact@upwell.vn",
    "tour_id": 541,
    "note_order": "Ghi chú đơn hàng",
    "source_id": 1,
    "branch_office_id": 1,
    "vat_type": "not-vat",
    "pricing": [
        {
            "price_rule_id": 1,
            "price": 200000,
            "quantity": 1,
            "period": 1,
            "vat":{
                "type":"percent",
                "amount": 0
            },
            "description": "",
            "unit":"pax"
        },
        {
            "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 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/tours' \
--header 'Content-Type: application/json' \
--data-raw '{
    "contact_name": "Upwell",
    "contact_phone": "0988777555",
    "contact_email": "contact@upwell.vn",
    "tour_id": 541,
    "note_order": "Ghi chú đơn hàng",
    "source_id": 1,
    "branch_office_id": 1,
    "vat_type": "not-vat",
    "pricing": [
        {
            "price_rule_id": 1,
            "price": 200000,
            "quantity": 1,
            "period": 1,
            "vat":{
                "type":"percent",
                "amount": 0
            },
            "description": "",
            "unit":"pax"
        },
        {
            "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
success
boolean 
required
message
string 
required
data
object 
required
id
integer 
required
code
string 
required
link_erp
string 
required
Example
{"success":true,"message":"The order created successfully","data":{"id":913,"code":"UP1913","link_erp":"{host}/admin/order/913/show"}}
Modified at 2025-03-03 09:19:09
Previous
Get all order
Next
Create order product
Built with