- Tổng quan
- Hướng dẫn xác thực
- API Beta 1.0
- API Zalo Mini App (Beta)
- Khách hàng
- Đơn hàng
- Sản phẩm
- Lịch khởi hành
- Lead (Cơ hội)
- Khách sạn
- Kế toán
- Phiếu thu
- Phiếu chi
- Cấu hình
- Zalo ZNS
- Địa điểm
- Nhân sự nội bộ
- Webhook
- Trạng thái khách hàng
- Loại dịch vụ
- Zalo ZNS
Create order product
POST
/api/v1/orders/products
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
contact_phone
string
required
contact_email
string
required
product_id
integer
required
service_id
integer
required
6: Vé tham quan
depart_date
string
required
note_order
string
required
source_id
integer
required
branch_office_id
integer
required
vat_type
string
required
pricing
array [object {8}]
required
price_rule_id
integer
required
price
integer
required
quantity
integer
required
period
integer
required
vat
object
required
description
string
required
unit
string
required
com_partner
string
optional
Example
{
"contact_name": "Upwell",
"contact_phone": "0988777555",
"contact_email": "contact@upwell.vn",
"product_id": 160,
"service_id": 6,
"depart_date": "03/03/2025",
"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",
"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 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/products' \
--header 'Content-Type: application/json' \
--data-raw '{
"contact_name": "Upwell",
"contact_phone": "0988777555",
"contact_email": "contact@upwell.vn",
"product_id": 160,
"service_id": 6,
"depart_date": "03/03/2025",
"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",
"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
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-29 11:29:57