# API TOURKIT

# TÀI LIỆU KẾT NỐI API TOURKIT

[![](https://docs.tourkit.vn/uploads/images/gallery/2026-04/scaled-1680-/image-1776911980128.png)](https://docs.tourkit.vn/uploads/images/gallery/2026-04/image-1776911980128.png)

**Hướng dẫn lầy API-key:**

- API-key lấy trên hệ thống CRM của tourkit
- Quản lý hệ thống =&gt; Cấu hình =&gt; Cấu hình công ty [![](https://docs.tourkit.vn/uploads/images/gallery/2026-04/scaled-1680-/image-1776912074849.png)](https://docs.tourkit.vn/uploads/images/gallery/2026-04/image-1776912074849.png)

###### **1. API đổ cơ hội từ web về CRM**

API cho phép nhận các phiếu tư vấn, đơn hàng tư vấn đổ từ các Website giới thiệu, bán hàng về kho cơ hội trong Tourkit để tiếp tục xử lý các khâu điều hành, vận hành [![](https://docs.tourkit.vn/uploads/images/gallery/2026-04/scaled-1680-/image-1777103886483.png)](https://docs.tourkit.vn/uploads/images/gallery/2026-04/image-1777103886483.png)

Endpoint:

https://&lt;domain\_CRM&gt;/api/Ticket/CreateTicket

METHOD: POST

Headers :

```
+ Content-Type : application/json

+ api-key: lấy trong quản lý hệ thống CRM.

```

[![](https://docs.tourkit.vn/uploads/images/gallery/2026-04/scaled-1680-/image-1777104051505.png)](https://docs.tourkit.vn/uploads/images/gallery/2026-04/image-1777104051505.png)

PARAMETER:

```
{

TenKH: string,
    
SoDienThoaiKH: string,
    
EmailKH: string,
    
DiaChiKH: string,
    
SoLuong: int,
    
QuantityChild: int,
    
QuantityBaby: int
    
Gia: decimal,
    
GiaChild: decimal,
    
GiaBaby: decimal,
      
TenPhieu: string,
    
NoiDungPhieu: string
    
}

```

Response:

200: Object Phiếu

5xx: Lỗi server

4xx: Lỗi trên Web

[![](https://docs.tourkit.vn/uploads/images/gallery/2026-04/scaled-1680-/image-1777104173026.png)](https://docs.tourkit.vn/uploads/images/gallery/2026-04/image-1777104173026.png)

###### **2. Lấy API danh sách tour từ CRM**

API lấy danh sách Tour từ CRM giúp cho doanh nghiệp có thể đấu được APIs

Endpoint:

https://&lt;domain\_CRM&gt;/api/Ticket/ListTourSample

METHOD: GET

Headers :

```
  + Content-Type : application/json
  + api-key: lấy trong quản lý hệ thống CRM.

```

[![](https://docs.tourkit.vn/uploads/images/gallery/2026-04/scaled-1680-/image-1777104274028.png)](https://docs.tourkit.vn/uploads/images/gallery/2026-04/image-1777104274028.png)

Body:

```
{

"keyword": "",
"sortby":1,    
"pageIndex":1,
"pageSize":50,
"startDateCI": "03/01/2024",
"endDateCI": "04/09/2024",
"startDateCO": "03/01/2024",
"endDateCO": "04/09/2024",
"marketId": -1
}

```

<table id="bkmrk-bi%E1%BA%BFn-ki%E1%BB%83u-d%E1%BB%AF-li%E1%BB%87u-%C3%9D-"><thead><tr><th>Biến</th><th>Kiểu dữ liệu</th><th>Ý nghĩa</th><th>Mặc định</th></tr></thead><tbody><tr><td>keyword</td><td>string</td><td>Tìm kiếm theo tên tour, mã tour,...</td><td>""</td></tr><tr><td>pageIndex</td><td>int</td><td>index của trang (KHÔNG PHẢI OFFSET)</td><td>1</td></tr><tr><td>pageSize</td><td>int</td><td>Số bản ghi một trang</td><td>10</td></tr><tr><td>startDateCI</td><td>datetime mm/dd/yyyy/</td><td>Tìm kiếm theo ngày bắt đầu</td><td>""</td></tr><tr><td>startDateCO</td><td>datetime mm/dd/yyyy</td><td>Tìm kiếm theo ngày kết thúc check-out</td><td>""</td></tr><tr><td>marketId</td><td>string</td><td>Tìm kiếm theo id thị trường của tour, sẽ được cung cấp bên dưới</td><td>-1</td></tr><tr><td>sortby</td><td>int</td><td>= 0 =&gt; Sắp xếp theo ngày đóng chỗ   
 = 1 =&gt; Sắp xếp theo số tiền người lớn giảm dần   
 = 2 =&gt; Sắp xếp theo số tiền người lớn tăng dần   
 = 3 =&gt; Sắp xếp theo ngày khởi hành</td><td>1</td></tr></tbody></table>

Response:

```
  {
    "id": 428, id tour [int]
    
    "tourCode": Mã tour,[string]
    
    "title": Tên tour,[string]
    
    "tourGuide": Hướng dẫn viên,[string]
    
    "numerOfSlots": 25, Tổng số chỗ
    
 	"cusRemaining": 19, số chỗ còn lại [int]
    
    "commissionAdult": 900000.0, hoa hồng người lớn [decimal]
    
    "commissionChild": 700000.0, hoa hồng trẻ em (6 - 11) [decimal]
    
    "commissionChildSmall": 700000.0, hoa hồng trẻ em (2 - 5) [decimal]
    
    "commissionBaby": 500000.0, hoa hồng trẻ nhỏ [decimal]
    
    "tourPrice": 7990000.0, giá tour [decimal]
    
    "pricePerSlot": 7990000.0, giá người lớn [decimal]
    
    "priceChild": 7590000.0, giá trẻ em (6 - 11)[decimal]
    
    "priceChildSmall": 0.0 ,giá trẻ em (2 - 5) [decimal]
    
    "priceBaby": 500000.0, giá trẻ nhỏ [decimal]       
    
    "placePickup": điểm đón,
    
    "placePickdown": điểm trả,
    
    "typeOf": loại hình,( Outbound, inbound, nội địa) [string]
    
    "marketId": id thị trường,[string]
    
    "bookingDate": "2024-04-11T00:00:00"  thời gian nhận chỗ,[ datetime]
    
    "closeDate":   "2024-04-11T00:00:00"  thời gian đóng chỗ, [datetime]
    
    "startDate": "2024-04-11T00:00:00"  thời gian khởi hành,[ datetime]
    
    "endDate":   "2024-04-11T00:00:00"  thời gian kết thúc, [datetime]
    
    "reversationTime": 222, Số giờ giữ chỗ [int]
    
    "NameVehicleGo": Tên hãng đi,
    
    "ImageVehicleGo": Link logo ảnh hãng phương tiện đi,
    
    "ticketVehicleGo": Hành trình vé đi,
    
    "NameVehicleBack": Tên hãng về,
    
    "ImageVehicleBack": Link logo ảnh hãng phương tiện về,
    
    "ticketVehicleBack": Hành trình vé về,
    
    "vehicleId": Id phương tiện,
 
    "journeyId": Id hành trình đi,
    
    "journeyBackId": Id hành trình về,

    "AvatarSchedule": Ảnh đại diện lịch trình,

    "SlideImageSchedule": Slide lịch trình,

    "totalRow": 262 Tổng số bản ghi [int]
},

```

###### **2.1. Chi tiết 1 hoặc nhiều tour**