# TÀI LIỆU API HƯỚNG DẪN PUBLISHER


# API DÀNH CHO PUBLISHER BẢN TIẾNG VIỆT


# Authentication

Tất cả các request đến API đều yêu cầu token trong header (bao gồm tất cả các methods: GET, POST, PUT...)

`Authorization: Token <access_key>`

`Content-Type: application/json`&#x20;

Lưu ý: cần truyền chính xác value cho key “Authorization” là : Token \`access\_key của bạn\`. (Token + \`dấu cách\` + \`access\_token\`) Access key lấy tại \`<http://pub.accesstrade.vn/accounts/profile\\`>


# Lấy danh sách campaigns

API lấy danh sách chiến dịch và thông tin chi tiết về chiến dịch

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

**>> Lấy danh sách tất cả campaign:**

```
https://api.accesstrade.vn/v1/campaigns
```

#### Danh sách parameter: <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| **Param**    | Require  | Description                                                    |
| ------------ | -------- | -------------------------------------------------------------- |
| approval     | Optional | approval=successful filter những chiến dịch đã được duyệt chạy |
| campaign\_id | Optional | filter nội dung theo campaign\_id                              |

**Ví dụ:**

**Lấy danh sách chiến dịch đã đăng được duyệt chạy( my campaign):**

```
https://api.accesstrade.vn/v1/campaigns?limit=20&page=25&approval=successful
```

#### Lấy thông tin chi tiết một campaign:

```
https://api.accesstrade.vn/v1/campaigns?campaign_id=5504029976883264018
```

#### Mô tả kết quả <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Tham số               | Mô tả                                                                                                                                                                          |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| total                 | Số lượng chiến dịch (campaigns).                                                                                                                                               |
| data.id               | Id của campaign.                                                                                                                                                               |
| data.name             | Tên chiến dịch.                                                                                                                                                                |
| data.approval         | <ul><li>unregistered: User chưa đăng kí chiến dịch.</li><li> pending: Chiến dịch đang chờ duyệt cho user. </li><li>successful: User được chấp thuận chạy chiến dịch.</li></ul> |
| data.status           | Trạng thái của campaign, 1: Running.                                                                                                                                           |
| data.merchant         | Tên merchant.                                                                                                                                                                  |
| data.cookie\_duration | Thời gian hiệu lực của cookie (second).                                                                                                                                        |
| data.cookie\_policy   | Mô tả hợp tác theo rule cookie                                                                                                                                                 |
| data.description      | Mô tả campaign.                                                                                                                                                                |
| data.start\_time      | Ngày băt đầu campaign.                                                                                                                                                         |
| data.end\_time        | Ngày kết thúc campaign.                                                                                                                                                        |
| data.category         | Ngành hàng của chiến dịch                                                                                                                                                      |
| data.sub\_category    |                                                                                                                                                                                |
| data.type             | Loại chiến dịch                                                                                                                                                                |
| data.url              | Url campaign.                                                                                                                                                                  |

> API response trả về

```
{
    "data": [
        {
            "approval": "successful",
            "category": "",
            "cookie_duration": 0,
            "cookie_policy": "",
            "description": {
                "action_point": "<p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">Leads đạt chuẩn yêu cầu sau:<br style=\"line-height: normal; clear: both;\">- Sống và làm việc ở HN, HCM ( có giấy tạm trú/ Hộ khẩu)<br style=\"line-height: normal; clear: both;\">- Chú ý chất lượng lead sẽ cao hơn với các khách có nơi ở thuộc các Quận ở HCM và khu vực HN. Lí do: thu nhập khách ổn định ; có đầy đủ giấy tờ và có mục đích mở thẻ nghiêm túc.<br style=\"line-height: normal; clear: both;\">- Thu nhập ổn định trên 8tr nhận lương theo hình thức chuyển khoản từ công ty<br style=\"line-height: normal; clear: both;\">- Trên 21 tuổi<br style=\"line-height: normal; clear: both;\">- Có hợp đồng Lao động<br style=\"line-height: normal; clear: both;\">- Đồng ý mở thẻ Citi&nbsp;<br style=\"line-height: normal; clear: both;\"><span style=\"font-weight: 700;\">* Lưu ý:</span>&nbsp;Để tăng tỷ lệ duyệt, các bạn định vị đúng vị trí HN/ HCM khi chạy Google ads or FB ads , tránh tình trạng các khách ở tỉnh thành khác đăng ký.</p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">** Hệ thống sẽ tự động lọc và hủy các lead không đáp ứng đủ các điều kiện trên</p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"font-weight: 700; letter-spacing: 0.13px;\">Thời gian phê duyệt kết quả thành công</span><span style=\"letter-spacing: 0.13px;\">: 4 tuần</span></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"letter-spacing: 0.13px;\">Tips: Cách chạy FB ads hiệu quả: nhắm vào các đối tượng có hành vi sử dụng các sản phẩm dịch vụ đắt tiền :&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"letter-spacing: 0.13px;\">- theo loại điện thoai: Iphone 8 trở lên, Samsung Note 9, S9, v.v</span></p><p style=\"line-height: 20px;\"><span style=\"color: rgb(98, 98, 98); font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; letter-spacing: 0.13px;\">- Dịch vụ có khuyến mãi của Citibank:&nbsp;</span></p><p style=\"line-height: 20px;\"><font face=\"Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"letter-spacing: 0.13px;\"><a href=\"https://docs.google.com/spreadsheets/d/1S6MYtRM7RncXowxm2mSAKUmaGMCgW5nIEFmRCVq-hSA/edit#gid=363488021\" target=\"_blank\">https://docs.google.com/spreadsheets/d/1S6MYtRM7RncXowxm2mSAKUmaGMCgW5nIEFmRCVq-hSA/edit#gid=363488021</a></span></font></p>",
                "commission_policy": "<span style=\"color: rgb(98, 98, 98); font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; letter-spacing: 0.13px;\">315,000VNĐ / lead</span>",
                "cookie_policy": "<p>Thời gian lưu cookie 30 ngày</p><p>Không bị ghi đè cookie bởi các bên khác</p>",
                "introduction": "<p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"color: rgb(98, 98, 98); font-size: 0.875rem; letter-spacing: 0.13px;\">Citibank là ngân hàng toàn cầu với hơn 200 năm kinh nghiệm trên toàn thế giới và hơn 20 năm hoạt động tại Việt Nam. Citibank hiện đang cung cấp các sản phẩm Thẻ Tín Dụng đáp ứng với từng nhu cầu của khách hàng:</span><span style=\"color: rgb(98, 98, 98); font-size: 0.875rem; letter-spacing: 0.13px;\">&nbsp;</span><br></p><p><font face=\"Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"letter-spacing: 0.13px;\">Các Khuyến mãi của thẻ Citi Bank:&nbsp;</span></font><a href=\"https://docs.google.com/spreadsheets/d/1S6MYtRM7RncXowxm2mSAKUmaGMCgW5nIEFmRCVq-hSA/edit#gid=1390843872\">https://docs.google.com/spreadsheets/d/1S6MYtRM7RncXowxm2mSAKUmaGMCgW5nIEFmRCVq-hSA/edit#gid=1390843872</a></p><p><font face=\"Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"letter-spacing: 0.13px;\">Danh sách keyword gợi ý: https://docs.google.com/spreadsheets/d/1aynvlYySDdPxeXy7pzieTW4R7oIXfaZc9zso_GeJob0/edit#gid=94956797</span><br></font><br></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">Thẻ tín dụng Citi Cash Back: sản phẩm Thẻ Tín Dụng Citi giúp Hoàn Tiền Mặt tốt nhất thị trường hiện nay. Thẻ tín dụng Citi Cash Back giúp khách hàng sử dụng được hoàn tiền đến 5% chi tiêu. Khách hàng có thể hoàn tiền đến 7.200.000VND mỗi năm. Tiền hoàn lại không bao giờ hết hạn.</p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"font-weight: 700; letter-spacing: 0.13px;\">Sản phẩm bán chạy:</span><br></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">o Thẻ Citi Rewards</p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; font-size: 0.875rem;\">o Thẻ tín dụng Citi Cash Back</span></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; font-size: 0.875rem;\">o</span><span style=\"font-size: 0.875rem; letter-spacing: 0.13px;\">&nbsp;Thẻ Citi Simplicity+</span></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><b style=\"font-weight: bold; color: rgb(21, 27, 38); margin: 0px; padding: 0px; border: 0px; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; letter-spacing: normal; white-space: pre-wrap;\">- Auto: Chiến dịch này sẽ được duyệt tự động. Sau khi đăng ký, bạn vui lòng chờ 5 phút và nhấn F5 (Refresh) để cập nhật trạng thái duyệt</b></p><p style=\"letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><b style=\"background-color: rgb(255, 255, 0);\">LƯU Ý: CHIẾN DỊCH CITIBANK SẼ TRACKING LƯỢNG CLICK VÀ ĐƠN HÀNG TRỰC TIẾP TRÊN WEBSITE CITIBANK, VÌ THẾ PUBLISHER SẼ KHÔNG XEM ĐƯỢC CLICK VÀ ĐƠN HÀNG TRẢ VỀ. </b></p><p style=\"letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><b style=\"background-color: rgb(255, 255, 0);\">ACCESSTRADE SẼ UPDATE TAY LƯỢNG ĐƠN HÀNG CHO PUB MỖI TUẦN 1 LẦN.&nbsp;</b></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><br></p>",
                "other_notice": "<span style=\"font-weight: bolder; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">Citibank cấm chạy SEM brand name, nếu phát hiện sẽ bị khóa link &amp; cắt hoa hồng</span>",
                "rejected_reason": "<span style=\"color: rgb(98, 98, 98); font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; letter-spacing: 0.13px;\">Không thoả mãn 1 trong những điều kiện trên và không có nhu cầu.</span>",
                "traffic_building_policy": "<p>- Trong trường hợp publishers có nhu cầu liên hệ khách hàng để xác nhận thông tin qua điện thoại hoặc email marketing. Publishers phải gửi cho AT: kịch bản gọi và email mẫu để ngân hàng duyệt trước khi chính thức chạy hình thức liên hệ khách hàng để xác nhận thông tin. Trong trường hợp publishers chạy hình thức này mà không báo thông tin cho AT và ngân hàng, các chuyển đổi trong tháng có thể bị huỷ và ngân hàng có quyền truy cứu nếu thông tin publishers đưa tới khách hàng không chính xác và không được duyệt bởi Ngân hàng hoặc AT.&nbsp;</p><p>- Publisher sẽ không mạo danh thương hiệu Ngân hàng để tạo các trang mạng xã hội hoặc Websites.</p><p>- Các Publishers sẽ không được sử dụng các hình thức quảng cáo sau: Chèn đường dẫn vào các quảng cáo không liên quan, Dẫn dụ khách hàng nhấp vào đường dẫn khi khách hàng không biết , Sử dụng sai thông tin về sản phẩm của Ngân Hàng dẫn dụ khách hàng</p><p>- Các chuyển đổi trong tháng có thể bị huỷ nếu vi phạm các chính sách trên</p>"
            },
            "end_time": null,
            "id": "5585194803623188142",
            "logo": "https://static.accesstrade.vn/adv/img/1612752152_Citi-Logo.png",
            "merchant": "citibank_new",
            "name": "Citibank New",
            "scope": "private",
            "start_time": "2021-02-05T14:25:04.542000",
            "status": 1,
            "sub_category": "",
            "type": -1,
            "url": "https://www.citibank.com.vn/vietnamese/form/uu-dai-mo-the-tin-dung/index.htm"
        }
    ]
}
```


# API Get campaign NEW

### 1. Mục đích:&#x20;

Hệ thống AT cung cấp thông tin danh sách campaigns đã chuẩn hóa.

### 2. Thông tin API

| DEV    | <https://api.accesstrade.vn/v1/cashback/campaigns?page=1\\&page\\_size=20> |
| ------ | -------------------------------------------------------------------------- |
| METHOD | GET                                                                        |

* #### Header

| Param         | Value                 |
| ------------- | --------------------- |
| Content-Type  | Application/json      |
| Authorization | Token {{access\_key}} |

* #### Params

| Param              | Type   | Mandatory | Description                                  |
| ------------------ | ------ | --------- | -------------------------------------------- |
| page               | Int    | Optional  | Số trang (không truyền mặc định 1)           |
| page\_size         | Int    | Optional  | Số phần tử trang                             |
| category\_id       | String | Optional  | category\_id                                 |
| sort\_by           | String | Optional  | Sort by min\_commission hoặc max\_commission |
| sort\_order        | String | Optional  | asc hoặc desc                                |
| sort\_by\_category | Bool   | Optional  | Sắp xếp theo category (true, false)          |

* #### Response

| Trường           | Kiểu dữ liệu | Mô tả                                   |
| ---------------- | ------------ | --------------------------------------- |
| campaign\_id     | string       | ID của campaign từ AT                   |
| min\_commission  | decimal      | Mức commission tối thiểu                |
| max\_commission  | decimal      | Mức commission tối đa                   |
| commission\_type | enum         | Loại commission ('percentage', 'fixed') |
| campaign\_type   | String       | Loại campaign                           |
| category\_id     | string       | ID danh mục                             |
| category\_name   | string       | Tên danh mục                            |
| is\_default      | boolean      | Đánh dấu mức commission mặc định        |

#### 3. Response example&#x20;

```
{
    "status": "success",
    "data": {
        "campaigns": [
            {
                "campaign_id": "4679977611385258995",
                "min_commission": 0.00,
                "max_commission": 6.24,
                "commission_type": "percentage",
                "category_name": "E-COMMERCE",
                "category_id": "7016",
                "all_commissions": [
                    {
                        "id": 143,
                        "min_commission": 0.00,
                        "max_commission": 6.24,
                        "commission_type": "percentage",
                        "category_id": "7016",
                        "category_name": "Sức khỏe - Làm đẹp",
                        "is_default": true
                    }
                ],
                "name": "THEFACESHOP - MỸ PHẨM THIÊN NHIÊN",
                "logo": "https://content.accesstrade.vn/adv/1705402791_avatar_1705402791.jpg",
                "status": "1",
                "categories": null,
                "sub_category": "Sức khỏe - Làm đẹp",
                "cookie_expire": 2592000,
                "merchant": "thefaceshopvn.myharavan.com",
                "url": "https://thefaceshop.com.vn/",
                "end_date": null,
                "gross_commission": 12070539,
                "scope": "public",
                "approval": "successful",
                "cookie_policy": "",
                "description": {
                    "action_point": "<p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">CPS (cost per sale) được định nghĩa là:</span><o:p></o:p></p><span style=\"font-family: Arial; font-size: 14px;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">Hoàn thành đơn đặt hàng online tại trang<span style=\"color: rgb(57, 132, 198);\">\nhttps://thefaceshop.com.vn/</span> và nhận hàng, thanh toán đơn hàng thành công.</span></p>",
                    "commission_policy": "<p class=\"MsoNormal\"><o:p></o:p></p><p><span style=\"font-size: 14px; font-family: Arial;\">Từ ngày 01.04.2024, hoa hồng của THE FACESHOP là 8.4%&nbsp;</span></p><p><span style=\"font-size: 14px; font-family: Arial;\">Hoa hồng áp dụng trước 1/4/2024</span></p><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"315\" style=\"width: 236pt;\">\n <colgroup><col width=\"251\" style=\"mso-width-source:userset;mso-width-alt:8750;width:188pt\">\n <col width=\"64\" style=\"width:48pt\">\n </colgroup><tbody><tr height=\"19\" style=\"height:14.5pt\">\n  <td height=\"19\" width=\"251\" style=\"height:14.5pt;width:188pt\">ID</td>\n  <td width=\"64\" style=\"width:48pt\">Hoa hồng&nbsp;</td>\n </tr>\n <tr height=\"19\" style=\"height:14.5pt\">\n  <td height=\"19\" style=\"height:14.5pt\">1002970039 - Trang điểm</td>\n  <td>7%</td>\n </tr>\n <tr height=\"19\" style=\"height:14.5pt\">\n  <td height=\"19\" style=\"height:14.5pt\">1000262792 - Dưỡng da</td>\n  <td>7.7%</td>\n </tr>\n <tr height=\"19\" style=\"height:14.5pt\">\n  <td height=\"19\" style=\"height:14.5pt\">1000262818 - Làm sạch nền</td>\n  <td>8.4%</td>\n </tr>\n <tr height=\"19\" style=\"height:14.5pt\">\n  <td height=\"19\" style=\"height:14.5pt\">1000263918 - Trang điểm</td>\n  <td>8.4%</td>\n </tr>\n <tr height=\"19\" style=\"height:14.5pt\">\n  <td height=\"19\" style=\"height:14.5pt\">1000263921 - Chăm sóc cơ thể&nbsp;</td>\n  <td>7.7%</td>\n </tr>\n <tr height=\"19\" style=\"height:14.5pt\">\n  <td height=\"19\" style=\"height:14.5pt\">DEFAULT - Ngành hàng khác</td>\n  <td>7%</td>\n </tr></tbody></table><p class=\"MsoNormal\"><o:p></o:p></p><p><br></p><p><img src=\"https://content.accesstrade.vn/adv/1678351871_campaign_1678351871.png\" alt=\"\" style=\"font-size: 0.875rem;\"><br></p>",
                    "cookie_policy": "<p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">- Cookies 30 ngày.</span><o:p></o:p></p><span style=\"font-family: Arial; font-size: 14px;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">- Reoccur (1 khách hàng có thể mua được nhiều sản phẩm/ nhiều\nlần trong thời gian cookies còn hiệu lực).</span><o:p></o:p></p><span style=\"font-family: Arial; font-size: 14px;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">- Last click =&gt; Nếu khách hàng click vào quảng cáo\nkhác (Facebook, Google, các kênh Affiliate khác) của nhà quảng cáo thì\nđơn hàng được tính cho nhấp chuột cuối cùng.</span></p>",
                    "introduction": "<p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">THE FACE SHOP chắc hẳn là một cái tên không còn xa lạ gì với\nnhiều chị em ở Việt Nam. Với thương hiệu đẳng cấp thế giới trong ngành làm đẹp,\nACCESSTRADE cùng THE FACE SHOP hi vọng đây sẽ làm campaign mạnh không đối thủ\ntrên thị trường affiliate cho ngành mỹ phẩm tại Việt Nam. Đừng bỏ lỡ cơ hội ngồi\ntrên vai người khổng lồ, hãy bắt đầu ngay đi thôi.</span></p><p class=\"MsoNormal\"><o:p></o:p></p><span style=\"font-family: Arial; font-size: 14px;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\"><span style=\"color: rgb(255, 0, 0); font-family: Arial; font-size: 14px;\">Chương trình Khuyến mãi&nbsp;được cập nhật liên tục</span><span style=\"font-family: Arial; font-size: 14px;\">&nbsp;</span><span style=\"color: rgb(57, 132, 198); font-family: Arial; font-size: 14px;\"><a href=\"https://docs.google.com/spreadsheets/d/12F9VfwtvrgUcUnKpzywBF9yUS4vGNoaNCZYUnuSkr-4/edit#gid=0\" target=\"_blank\">TẠI ĐÂY.</a></span></span></p><p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\"><span style=\"font-family: Arial; font-size: 14px;\"><b style=\"\">CHƯƠNG TRÌNH THƯỞNG HÀNG THÁNG</b></span></span></p><p class=\"MsoNormal\"><span style=\"background-color: transparent; font-family: Arial; font-size: 14px; white-space-collapse: preserve; text-transform: uppercase;\">1. </span><span style=\"font-family: Arial; font-size: 14px;\">CHƯƠNG TRÌNH THƯỞNG THEO DOANH THU ĐƯỢC DUYỆT TRONG THÁNG:</span></p><h5 class=\"x1heor9g x1qlqyl8 x1pd3egz x1a2a7pz xyorhqc xtvhhri x1anpbxc\" style=\"margin: 10px 0px; padding: 0px; outline-style: none; outline-width: initial;\"><span style=\"\" id=\"docs-internal-guid-4c9d5244-7fff-dda5-4cc5-53f277f01694\"><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\"><span style=\"font-family: Arial; font-size: 14px;\">&nbsp;- Thưởng ngay 5% trên hoa hồng được duyệt trong tháng khi Publishers đạt doanh thu bán hàng từ 1 triệu - 5 triệu</span></font></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\"><span style=\"font-family: Arial; font-size: 14px;\">- Thưởng ngay 7% trên hoa hồng được duyệt trong tháng khi Publishers đạt doanh thu bán hàng từ 5 triệu đến dưới 10 triệu</span></font></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\"><span style=\"font-family: Arial; font-size: 14px;\">- Thưởng ngay 10% trên hoa hồng được duyệt trong tháng khi Publishers đạt doanh thu bán hàng từ 10 triệu trở lên</span></font></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\"><span style=\"font-family: Arial; font-size: 14px;\">2. CHƯƠNG TRÌNH PUB MỚI:</span></font></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\"><span style=\"font-family: Arial; font-size: 14px;\">- Thưởng ngay 10K/ 1 đơn hàng được duyệt cho Pub mới</span></font></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\"><span style=\"font-family: Arial; font-size: 14px;\">* Điều kiện: Pub chưa ra đơn (đơn hàng thành công) ở chiến dịch The Face Shop trong 2 tháng trước đó</span></font></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\">ÁP DỤNG: TỪ 4.2024 -&nbsp; ĐẾN KHI CÓ THÔNG BÁO MỚI&nbsp;</font></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\"><span style=\"font-family: Arial; font-size: 14px;\"><br></span></font></p><p class=\"MsoNormal\" style=\"font-size: 14px; font-weight: 400;\"><font face=\"Arial\"><span style=\"font-family: Arial; font-size: 14px;\"><br></span></font></p></span></h5>",
                    "other_notice": "<p class=\"MsoNormal\"><span style=\"font-family: Arial;\"><span style=\"color: rgb(255, 0, 0); font-family: Arial;\">Chương trình Khuyến mãi&nbsp;được cập nhật liên tục</span><span style=\"font-family: Arial;\">&nbsp;</span><span style=\"color: rgb(57, 132, 198); font-family: Arial;\"><a href=\"https://docs.google.com/spreadsheets/d/1DCsfCYIISEBooZsEE4PhOyEdOlvBtO5Bu_fOXgiVLcM/edit#gid=1827323108\" target=\"_blank\">TẠI ĐÂY.</a></span></span></p><p class=\"MsoNormal\"><span style=\"font-size: 0.875rem; font-family: Arial;\"><span style=\"color: rgb(255, 0, 0); font-family: Arial;\">Publisher Guideline (AOV, Target Audience, Location,...)</span><span style=\"font-family: Arial;\">&nbsp;</span><span style=\"color: rgb(57, 132, 198); font-family: Arial;\"><a href=\"https://docs.google.com/document/d/1UpBqJpbDfgFxSnMNIyhI_wSm7PxWypifakNT7TrfVaw/edit?usp=sharing\" target=\"_blank\">XEM TẠI ĐÂY.</a></span></span></p><p class=\"MsoNormal\"><o:p></o:p></p><span style=\"font-family: Arial;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial;\">Từ 01.07.2021, THEFACESHOP không cho phép chạy SEM brand\nname keyword, bao gồm:&nbsp; &nbsp;thefaceshop,&nbsp;the face shop,&nbsp;the\nfaceshop,&nbsp;faceshop,&nbsp;face shop; Tuy nhiên&nbsp;Vẫn cho phép chạy các\nsub_brand keywords. (Yehwadam, FMGT, Herbday… của TheFaceShop)</span><o:p></o:p></p><span style=\"font-family: Arial;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial; color: rgb(255, 0, 0);\">Quy định cho publisher:&nbsp;</span><span style=\"font-family: Arial; color: rgb(57, 132, 198);\"><a href=\"https://docs.google.com/spreadsheets/d/1EDqJ0967KuiTxc0AarJSMHCBTsE5BjR3EL_h8TXrYPQ/edit#gid=0\" target=\"_blank\">TẠI ĐÂY.</a></span><br></p>",
                    "rejected_reason": "<p><font face=\"Helvetica\"><span style=\"font-family: Arial; font-size: 14px;\">Không thanh toán thành công.</span></font></p><p><font face=\"Helvetica\"><span style=\"font-family: Arial; font-size: 14px;\">Hủy đơn hàng.</span></font></p>",
                    "traffic_building_policy": "<p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">Từ 01.07.2021, THEFACESHOP không cho phép chạy SEM brand\nname keyword, bao gồm:&nbsp; &nbsp;thefaceshop,&nbsp;the face shop,&nbsp;the\nfaceshop,&nbsp;faceshop,&nbsp;face shop; Tuy nhiên&nbsp;Vẫn cho phép chạy các\nsub_brand keywords. (Yehwadam, FMGT, Herbday… của TheFaceShop).</span><o:p></o:p></p><span style=\"font-family: Arial; font-size: 14px;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">- Nghiêm cấm mạo danh The Face Shop dưới mọi hình thức.</span><o:p></o:p></p><span style=\"font-family: Arial; font-size: 14px;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">- Nghiêm cấm quảng cáo các sản phẩm của The Face Shop tại các\ntrang web đen hoặc nguồn không chính thống.</span><o:p></o:p></p><span style=\"font-family: Arial; font-size: 14px;\">\n\n</span><p class=\"MsoNormal\"><span style=\"font-family: Arial; font-size: 14px;\">- Quảng cáo phải được tuân thủ các điều khoản về cách thức và\nnội dung quảng cáo theo đúng pháp luật Việt Nam quy định.</span></p>"
                },
                "start_date": "2018-11-20T00:00:00",
                "type": 3,
                "adv_code": "thefaceshopvn.myharavan.com"
            }
        ],
        "meta": {
            "per_page": 50,
            "current_page": 1,
            "total": 1
        }
    },
    "message": "Success",
    "code": "PX00000"
}

```


# Tạo tracking link

API mô tả cách tạo tracking link của các campaign

**Method: POST**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/product_link/create
```

#### Data Parameter <a href="#query-parameters" id="query-parameters"></a>

| Biến params    | Required | Mô tả                                                                                                                                                                                                                                                                     |
| -------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| campaign\_id   | bắt buộc | Campaign ID                                                                                                                                                                                                                                                               |
| urls           | tùy chọn | Danh sách link muốn tạo cách nhau bởi dấu phẩy. Nếu không truyền urls sẽ lấy url trong campaign                                                                                                                                                                           |
| utm\_source    | tùy chọn | Tham số tracking thêm pub truyền vào                                                                                                                                                                                                                                      |
| utm\_medium    | tùy chọn | Tham số tracking thêm pub truyền vào                                                                                                                                                                                                                                      |
| utm\_campaign  | tùy chọn | Tham số tracking thêm pub truyền vào                                                                                                                                                                                                                                      |
| utm\_content   | tùy chọn | Tham số tracking thêm pub truyền vào                                                                                                                                                                                                                                      |
| sub1           | tùy chọn | Tham số tracking thêm pub truyền vào                                                                                                                                                                                                                                      |
| sub2           | tùy chọn | Tham số tracking thêm pub truyền vào                                                                                                                                                                                                                                      |
| sub3           | tùy chọn | Tham số tracking thêm pub truyền vào                                                                                                                                                                                                                                      |
| sub4           | tùy chọn | Tham số tracking thêm pub truyền vào                                                                                                                                                                                                                                      |
| `short_domain` | tùy chọn | Domain rút gọn tùy chỉnh (tùy chọn) khi tạo short link cho affiliate link. Publisher có thể dùng domain riêng thay vì domain rút gọn mặc định của AccessTrade (có trong danh sách park domain đã được setup trên trang <https://pub2.accesstrade.vn/tool/parking_domain>) |

> CURL Example
>
> ```
>
> curl --location 'https://api.accesstrade.vn//v1/product_link/create' \
> --header 'Content-Type: application/json' \
> --header 'Authorization: token {your_token}' \
> --data '{
>     "campaign_id": "4348614231480407268",
>     "urls": ["https://shopee.vn/m/ma-giam-gia"],
>     "utm_source": "test_source",
>     "url_enc": true,
>     "utm_medium": "test_medium",
>     "utm_campaign": "test_campaign",
>     "utm_content": "test_content",
>     "sub1": "test_sub1",
>     "sub2": "test_sub2",
>     "sub3": "test_sub3",
>     "short_domain": "{your_short_domain}"
>     }'
> ```

**API response:**

````
```json
{
    "data": {
        "error_link": [],
        "success_link": [
            {
                "aff_link": "https://tracking.dev.accesstrade.me/deep_link/4348611760548105593/4751584435713464237?utm_campaign=test_campaign&sub4=test_sub4&sub2=test_sub2&sub3=test_sub3&sub1=test_sub1&url=https%3A%2F%2Fshopee.vn&utm_content=test_content&utm_source=test_source&utm_medium=test_medium",
                "first_link": null,
                "short_link": "https://shorten.dev.accesstrade.me/ujrBHxpc",
                "url_origin": "https://shopee.vn"
            }
        ],
        "suspend_url": []
    },
    "success": true
}
```
````


# Lấy danh sách giao dịch

**Method: GET**

#### HTTP Request

<https://api.accesstrade.vn/v1/transactions>

\*Limit : 10 requests/1 phút

**Query Parameters**

Các biến params được truyền vào HTTP Request theo các cặp Key-Value, mở đầu chuỗi params bằng dấu “?” và giữa các biến phân tách nhau bằng dấu “&”. Vd:

<https://api.accesstrade.vn/v1/transactions?since=2021-01-01T00:00:00Z&until=2021-01-03T00>

| **Biến params**     | **Required** | **Mô tả**                                                                                                                                                          |
| ------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| since               | Bắt buộc     | Thời gian bắt đầu report theo sale time (ISO format), ví dụ “2016-08-01T00:00:00Z”.                                                                                |
| until               | Bắt buộc     | Thời gian kết thúc report theo sale time (ISO format), ví dụ “2016-08-02T00:00:00Z”.                                                                               |
| page                | Tùy chọn     | Số trang, default None.                                                                                                                                            |
| offset              | Tùy chọn     | Offset value, default 0.                                                                                                                                           |
| limit               | Tùy chọn     | Số kết quả trả về mỗi lần, default 100.                                                                                                                            |
| merchant            | Tùy chọn     | Tên merchant. ex: tikivn.                                                                                                                                          |
| utm\_source         | Tùy chọn     | Ex: facebook                                                                                                                                                       |
| utm\_campaign       | Tùy chọn     |                                                                                                                                                                    |
| utm\_medium         | Tùy chọn     | Ex: email                                                                                                                                                          |
| utm\_content        | Tùy chọn     |                                                                                                                                                                    |
| status              | Tùy chọn     | <p>Trạng thái giao dịch:</p><ul><li>0 : hold</li><li>1 : approved</li><li> 2 : rejected</li></ul>                                                                  |
| is\_confirmed       | Tùy chọn     | <p>Trạng thái giao dịch: </p><ul><li>0 : chưa duyệt</li><li> 1 : đã duyệt (Nếu có tham số is\_confirmed mà không có status thì mặc định trường status=1)</li></ul> |
| transaction\_id     | Tùy chọn     | Mã giao dịch, có thể filter 1 (transaction\_id=1234567) hoặc nhiều (transaction\_id=1234567,7654321) bằng cách dùng dấu phẩy “,” để ngăn cách các mã.              |
| update\_time\_start | Tùy chọn     | Thời gian bắt đầu report theo thời gian update transaction (ISO forrmat), ví dụ “2016-08-01T00:00:00Z”.                                                            |
| update\_time\_end   | Tùy chọn     | Thời gian kết thúc report theo thời gian update transaction (ISO forrmat), ví dụ “2016-08-05T00:00:00Z”.                                                           |
| is\_brand\_bonus    | Tùy chọn     | <p>Filter theo 2 giá trị:</p><ul><li>true: Các mã giao dịch có ghi nhận brand bonus</li><li>false: Các mã giao dịch không ghi nhận brand bonus</li></ul>           |

**API reponse trả về:**

```
"data": [
        {
            "merchant": "shopee",
            "status": 1,
            "update_time": "2023-03-30T19:51:57",
            "click_url": "https://shopee.vn/universal-link/Móc-gắn-chìa-khóa-hình-chú-heo-xinh-xắn-i.565282464.12333534959?utm_campaign=&c=322&af_reengagement_window=7d&af_click_lookback=7d&utm_content=1-XZad9YPgG7WnFjkGT9nSUaphqmwHH5qVHsP0E3lHS8wiYbQo-accesstrade--&af_siteid=an_17104620000&pid=affiliates&utm_source=an_17104620000&is_retargeting=true&sp_atk=7b175c8d-430b-45d0-b1b9-d4d8964d82b3&xptdk=7b175c8d-430b-45d0-b1b9-d4d8964d82b3&af_sub_siteid=1&utm_medium=affiliates&af_viewthrough_lookback=1d&atnct1=5737c6ec2e0716f3d8a7a5c4e0de0d9a&atnct2=XZad9YPgG7WnFjkGT9nSUaphqmwHH5qVHsP0E3lHS8wiYbQo&atnct3=OexQA00063d000001",
            "conversion_platform": "website",
            "utm_campaign": "",
            "product_category": "brand_bonus",
            "utm_content": "",
            "transaction_time": "2023-01-04T09:02:45",
            "product_image": "",
            "utm_source": "",
            "is_brand_bonus": true,
            "transaction_value": 262.0,
            "_extra": {
                "parameters": {
                    "at_unique_id": "yNGwpAWm6PX~V~Ya2Yubeanxat",
                    "click_url": "https://shopee.vn/universal-link/Móc-gắn-chìa-khóa-hình-chú-heo-xinh-xắn-i.565282464.12333534959?utm_campaign=&c=322&af_reengagement_window=7d&af_click_lookback=7d&utm_content=1-XZad9YPgG7WnFjkGT9nSUaphqmwHH5qVHsP0E3lHS8wiYbQo-accesstrade--&af_siteid=an_17104620000&pid=affiliates&utm_source=an_17104620000&is_retargeting=true&sp_atk=7b175c8d-430b-45d0-b1b9-d4d8964d82b3&xptdk=7b175c8d-430b-45d0-b1b9-d4d8964d82b3&af_sub_siteid=1&utm_medium=affiliates&af_viewthrough_lookback=1d&atnct1=5737c6ec2e0716f3d8a7a5c4e0de0d9a&atnct2=XZad9YPgG7WnFjkGT9nSUaphqmwHH5qVHsP0E3lHS8wiYbQo&atnct3=OexQA00063d000001",
                    "click_user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
                    "utm_tool": "deeplink"
                },
                "device_model": null,
                "device_family": "Other",
                "device_brand": null,
                "device_type": "pc",
                "device": "None Other",
                "os": "Windows",
                "browser": "Chrome"
            },
            "reason_rejected": "",
            "category_name": "",
            "utm_term": "",
            "product_id": "brand_bonus_12333534959@shopee@bonus",
            "is_confirmed": 1,
            "confirmed_time": "2023-02-28T23:59:59",
            "product_price": 262.0,
            "id": "95ea6bb766b28ecc419a9b3979ba29c2",
            "commission": 225.0,
            "customer_type": "",
            "conversion_id": 148916905,
            "utm_medium": "",
            "product_quantity": 1,
            "click_time": "2023-01-04T09:02:26",
            "product_name": "",
            "transaction_id": "230104EETP0VN8"
    
```

**Mô tả kết quả:**

| Tham số                   | Mô tả                                                                                                                                                                 |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| total                     | Số lượng conversion, tính theo từng sản phẩm.                                                                                                                         |
| data.status               | <p>Trạng thái của conversion</p><ul><li>0: Pending or hold</li><li> 1: Approved</li><li> 2: Rejected.</li></ul>                                                       |
| data.merchant             | Tên merchant.                                                                                                                                                         |
| data.click\_time          | Thời gian phát sinh click, theo ISODate.                                                                                                                              |
| data.transaction\_id      | ID của giao dịch (Đơn hàng).                                                                                                                                          |
| data.transaction\_time    | Thời gian phát sinh giao dịch, theo ISODate.                                                                                                                          |
| data.update\_time         | Thời gian update thông tin giao dịch, theo ISODate.                                                                                                                   |
| data.confirmed\_time      | Thời gian duyệt giao dịch, theo ISODate.                                                                                                                              |
| data.is\_confirmed        | Trạng thái giao dịch: 0 - chưa duyệt, 1 - đã duyệt                                                                                                                    |
| data.transaction\_value   | Giá trị giao dịch.                                                                                                                                                    |
| data.commission           | Hoa hồng cho publisher.                                                                                                                                               |
| data.product\_id          | ID của sản phẩm.                                                                                                                                                      |
| data.product\_price       | Giá của sản phẩm.                                                                                                                                                     |
| data.product\_quantity    | Số lượng sản phẩm.                                                                                                                                                    |
| data.\_extra              | Các thông tin liên quan đến hệ điều hành và trình duyệt.                                                                                                              |
| data.\_utm\*              | Giá trị các tham số utm.                                                                                                                                              |
| data.category\_name       | Tên ngành hàng                                                                                                                                                        |
| data.conversion\_id       | Id của conversion                                                                                                                                                     |
| data.conversion\_platform | Các nền tảng của conversion                                                                                                                                           |
| data.customer\_type       | Loại khách hàng                                                                                                                                                       |
| data.product\_category    | Danh mục của sản phẩm                                                                                                                                                 |
| data.product\_image       | Hình ảnh của sản phẩm                                                                                                                                                 |
| data.product\_name        | Tên sản phẩm                                                                                                                                                          |
| data.reason\_reject       | Lý do hủy                                                                                                                                                             |
| is\_brand\_bonus          | <p>Thông tin brand bonus của sản phẩm:</p><ul><li>true: Các mã giao dịch có ghi nhận brand bonus</li><li>false: Các mã giao dịch không ghi nhận brand bonus</li></ul> |

*Example cURL: curl --location '<https://api-v1.dev.accesstrade.me/v1/transactions?until=2023-03-03T16%3A00%3A00Z\\&since=2023-01-03T15%3A00%3A00Z\\&limit=2>' \\*

*--header 'Authorization: Token bg1F-zURtCYDWH8KB79fLS5abjIyOg0G' \\*

*--header 'Content-Type: application/json'*


# Lấy danh sách đơn hàng v2

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/order-list
```

#### \*Lưu ý:   <a href="#query-parameters" id="query-parameters"></a>

* Limit : 10 requests/1 phút
* Cache 1 phút

#### Query Parameters <a href="#query-parameters" id="query-parameters"></a>

Các biến params được truyền vào HTTP Request theo các cặp Key-Value, mở đầu chuỗi params bằng dấu “?” và giữa các biến phân tách nhau bằng dấu “&”. Vd:&#x20;

```
https://api.accesstrade.vn/v1/order-list?since=2021-01-01T00:00:00Z&until=2021-01-10T00:00:00Z
```

| Biến params   | Required | Mô tả                                                                                                        |
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| since         | bắt buộc | Thời gian bắt đầu report, theo ISO format, ví dụ “2016-08-01T00:00:00Z”.                                     |
| until         | bắt buộc | Thời gian kết thúc report, theo ISO format, ví dụ “2016-08-02T00:00:00Z”.                                    |
| page          | tùy chọn | Thứ tự page. Bắt đầu từ 1. Mặc định 1                                                                        |
| utm\_source   | tùy chọn | Ex: facebook                                                                                                 |
| utm\_campaign | tùy chọn |                                                                                                              |
| utm\_medium   | tùy chọn | Ex: email                                                                                                    |
| utm\_content  | tùy chọn |                                                                                                              |
| limit         | tùy chọn | Số lượng đơn hàng trả về mỗi page. Mặc định 30. Tối đa 300 (nếu điền quá 300 thì mặc định set 300)           |
| status        | tùy chọn | <p>Trạng thái của conversion</p><ul><li>0: Pending or hold</li><li>1: Approved</li><li>2:Rejected.</li></ul> |
| merchant      | tùy chọn | Vi dụ: adayroi, lazada.                                                                                      |

> API response trả về

```
{
"data": 
    [
       {
           "at_product_link": "https://shopee.vn/universal-link/product/214196144/17730719201?utm_campaign=&c=679&af_reengagement_window=7d&af_click_lookback=7d&smtt=0.549607455-1653894909.9&utm_content=XDbU5H4Qjy87NtFmlCNrsEo4jtBMzjvPRv3EON3JTvinCYXR-540355-679-IG-&af_siteid=an_17156540000&pid=affiliates&utm_source=an_17156540000&is_retargeting=true&referer=at-kol-new&af_sub_siteid=540355&utm_medium=affiliates&af_viewthrough_lookback=1d&atnct1=ca9c267dad0305d1a6308d2a0cf1c39c&atnct2=XDbU5H4Qjy87NtFmlCNrsEo4jtBMzjvPRv3EON3JTvinCYXR&atnct3=h50RJ00079r00bkxv",
           "billing": 69000.0,
           "browser": "Mobile Safari UI/WKWebView",
           "category_name": "Fashion_Accessories",
           "click_time": "2022-05-31T00:28:09",
           "client_platform": "mobile",
           "confirmed_time": "2022-07-01T23:59:31",
           "conversion_platform": null,
           "customer_type": null,
           "is_confirmed": 0,
           "landing_page": "https://www.instagram.com/",
           "merchant": "shopee_kolnew",
           "order_id": "220602QAVKQKCM",
           "order_pending": 0,
           "order_reject": 0,
           "order_approved": 1,
           "product_category": "Phu_Kien_Thoi_Trang",
           "products_count": 1,
           "pub_commission": 2208.0,
           "sales_time": "2022-06-01T23:59:31",
           "update_time": "2022-07-07T10:23:13",
           "utm_campaign": null,
           "utm_content": null,
           "utm_medium": null,
           "utm_source": "IG",
           "website": "https://www.instagram.com/",
           "website_url": "https://www.instagram.com/"
       }
   ],
   "total": 589
}
```

**Mô tả kết quả:**

| **Tham số**               | **Mô tả**                                                                                          |
| ------------------------- | -------------------------------------------------------------------------------------------------- |
| data.at\_product\_link    | Link cuối gắn các tham số tracking                                                                 |
| data.billing              | Giá trị đơn hàng                                                                                   |
| data.browser              | Nền tảng phát sinh đơn hàng                                                                        |
| data.category\_name       | Ngành hàng                                                                                         |
| data.click\_time          | Thời gian click                                                                                    |
| data.client\_platform     | Thiết bị                                                                                           |
| data.confirmed\_time      | Thời gian xác nhận giao dịch                                                                       |
| data.conversion\_platform |                                                                                                    |
| data.customer\_type       |                                                                                                    |
| data.is\_confirmed        | <p>Trạng thái duyệt đối soát giao dịch: </p><ul><li>0 - chưa duyệt</li><li>1 - đã duyệt </li></ul> |
| data.landing\_page        |                                                                                                    |
| data.merchant             | Tên merchant                                                                                       |
| data.order\_id            | ID đơn hàng                                                                                        |
| data.order\_pending       | Trạng thái đơn hàng (tổng số lượng item ở trạng thái pending)                                      |
| data.order\_reject        | Trạng thái đơn hàng (tổng số lượng item ở trạng thái reject)                                       |
| data.order\_approved      | Trạng thái đơn hàng (tổng số lượng item ở trạng thái approved)                                     |
| data.product\_category    | Ngành hàng của sản phẩm                                                                            |
| data.products\_count      | Số lượng sản phẩm                                                                                  |
| data.pub\_commission      | Hoa hồng cho publisher                                                                             |
| data.sales\_time          | Thời gian phát sinh                                                                                |
| data.update\_time         | Thời gian cập nhật                                                                                 |
| data.utm\_campaign        | utm\_campaign                                                                                      |
| data.utm\_content         | utm\_content                                                                                       |
| data.utm\_medium          | utm\_medium                                                                                        |
| data.utm\_source          | utm\_source                                                                                        |
| data.website              | Website nguồn                                                                                      |
| data.website\_url         | Đường dẫn đến website nguồn                                                                        |


# Lấy thông tin sản phẩm của đơn hàng

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/order-products
```

\*Lưu ý: **Limit : 10 requests/1 phút**

Các biến params được truyền vào HTTP Request theo các cặp Key-Value, mở đầu chuỗi params bằng dấu “?” và giữa các biến phân tách nhau bằng dấu “&”. Vd:&#x20;

```
https://api.accesstrade.vn/v1/order-products?order_id=6357878818&merchant=shopee_kolnew
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Biến params | Required | Mô tả                                          |
| ----------- | -------- | ---------------------------------------------- |
| order\_id   | bắt buộc | Order\_id của đơn hàng (lấy bên api order\_v2) |
| merchant    | bắt buộc | Tên merchant. Ví dụ: adayroi, lazada           |
| page        | tùy chọn | Thứ tự page. Bắt đầu từ 1. Mặc định 1          |
| limit       | tùy chọn | Số lượng đơn hàng trả về mỗi page.             |

> API response trả về

> ```
> {
>     "data": 
>     [
>         {
>             "_at": 
>             {
>                 "banner_id": 9419,
>                 "commission_type": 2,
>                 "goods_id": "1788784899_VNAMZ-8035509904@lazada_cashback@1788784899_VNAMZ-8035509904",
>                 "result_id": 30,
>                 "reward_type": 2,
>                 "seq_no": 118228959,
>                 "vn_click_id": ""
>             },
>             "_extra": 
>             {
>                 "browser": "Chrome Mobile",
>                 "device": "Generic Generic Smartphone",
>                 "device_brand": "Generic",
>                 "device_family": "Generic Smartphone",
>                 "device_model": "Smartphone",
>                 "device_type": "mobile",
>                 "os": "Android",
>                 "parameters": 
>                 {
>                     "at_unique_id": "_G0GGDRV72f40ncIeZeRPinxat",
>                     "click_url": "https://c.lazada.vn/t/c.ZCM0dX?sub_aff_id=wNsfVI1B2Rp7y16Fnbmd4ykro1GDM0LuNVmmV3SgScFgQffd&url=https%3A%2F%2Fwww.lazada.vn%2F&sub_id1=684099&atnct1=71a3cb155f8dc89bf3d0365288219936&atnct2=wNsfVI1B2Rp7y16Fnbmd4ykro1GDM0LuNVmmV3SgScFgQffd&atnct3=SKTej00079n00enur",
>                     "click_user_agent": "Mozilla/5.0 (Linux; U; Android 12; vi-vn; CPH2113 Build/SKQ1.210216.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.88 Mobile Safari/537.36 HeyTapBrowser/45.8.4.1",
>                     "utm_campaign": "5249638763776692551",
>                     "utm_source": "123494162",
>                     "utm_tool": "deeplink"
>                 }
>             },
>             "_id": "1788784899_VNAMZ-8035509904@lazada_cashback@1788784899_VNAMZ-8035509904",
>             "billing": 
>             {
>                 "approved": 0,
>                 "pending": 0,
>                 "reject": 129700.0
>             },
>             "campaign_id": "677",
>             "click_time": "2022-05-21T19:54:32",
>             "commission": 
>             {
>                 "approved": 0,
>                 "pending": 0,
>                 "reject": 3774.0
>             },
>             "confirmed_time": "2022-06-10T09:59:16",
>             "merchant": "lazada_cashback",
>             "product_price": 129700.0,
>             "product_quantity": 1,
>             "quantity": 
>             {
>                 "approved": 0,
>                 "pending": 0,
>                 "reject": 1
>             },
>             "reason_rejected": "N/A",
>             "sales_time": "2022-05-21T19:58:00"
>         }
>     ]
>     "total": 1
> }
> ```

**Mô tả kết quả**

| **Tham số**            | **Mô tả**                                                                                                                                                                                                                      |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| data.\_at              | Các thông tin liên quan đến tracking                                                                                                                                                                                           |
| data.extra             | Thông tin các trình duyệt và hệ điều hành truy cập                                                                                                                                                                             |
| data.\_id              | ID của sản phẩm                                                                                                                                                                                                                |
| data.billing           | <p>Giá trị sản phẩm (đã trừ discount)</p><ul><li>Approved: giá trị sản phẩm ở trạng thái được duyệt</li><li>Pending: giá trị sản phẩm ở trạng thái pending</li><li>Reject: giá trị sản phẩm ở trạng thái hủy</li></ul><p> </p> |
| data.campaign\_id      | ID campaign                                                                                                                                                                                                                    |
| data.click\_time       | Thời gian click                                                                                                                                                                                                                |
| data.commission        | <p>Hoa hồng cho publisher</p><ul><li>Approved: hoa hồng ở trạng thái được duyệt</li><li>Pending: hoa hồng ở trạng thái pending</li><li>Reject: hoa hồng ở trạng thái hủy</li></ul>                                             |
| data.confirmed\_time   | Thời gian xác nhận giao dịch                                                                                                                                                                                                   |
| data.merchant          | Tên merchant                                                                                                                                                                                                                   |
| data.product\_price    | Giá bán                                                                                                                                                                                                                        |
| data.product\_quantity | <p>Tổng số lượng sản phẩm</p><ul><li>Approved: số lượng sản phẩm ở trạng thái được duyệt</li><li>Pending: số lượng sản phẩm ở trạng thái pending</li><li>Reject: số lượng sản phẩm ở trạng thái hủy</li></ul>                  |
| data.reason\_reject    | Lý do hủy                                                                                                                                                                                                                      |
| data.sale\_time        | Thời gian phát sinh đơn hàng                                                                                                                                                                                                   |


# Lấy thông tin chi tiết sản phẩm

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/product_detail
```

Các biến params được truyền vào HTTP Request theo các cặp Key-Value, mở đầu chuỗi params bằng dấu “?” và giữa các biến phân tách nhau bằng dấu “&”. Vd:&#x20;

```
https://api.accesstrade.vn/v1/product_detail?merchant=fpt_longchau&product_id=00033675--80799010-N-1&transaction_id=80799016941733898708944
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Biến params     | Required | Mô tả                   |
| --------------- | -------- | ----------------------- |
| merchant        | bắt buộc | Vi dụ: adayroi, lazada. |
| product\_id     | bắt buộc | Id sản phẩm.            |
| transaction\_id | bắt buộc | Mã giao dịch            |

> API response trả về

```
{
    "name": "Xiaomi Mi5s 64GB (Đen)",
    "price": 6090000.0,
    "short_desc": "Xiaomi Mi 5s - Phiên bản nâng cấp hoàn hảo của Mi5Xiaomi Mi 5s cuối cùng cũng đã chính thức ra mắt vào ngày hôm nay 27/9/2016 đúng như thông tin mà hãng điện thoại Trung Quốc tiết lộ trước đó. Giống như tin đồn rò rỉ trước đó chiếc điện thoại thông minh Xiaomi Mi 5s được trang bị cảm biển siêu âm cùng nhiều tính năng mới mẽ. Xiaomi Mi 5s Xiaomi Mi 5s Không chỉ được trang bị nhiều tính năng mới mà mẫu flagship Xiaomi Mi 5s còn được trang bị cấu hình mạnh mẽ với chip Snapdragon 821 mới nhất, RAM 4/6GB đây được xem là bản nâng cấp đáng giá của Xiaomi Mi5 ra mắt trước đó. Đánh giá thiết kế Xiaomi Mi 5s: Cũng giống như những mẫu smartphone cao cấp gần đây của hãng Xiaomi Mi 5s vẫn được làm bằng bộ khung kim loại nguyên khối cao cấp và sang trọng. Mặt trước và sau của máy được bo cong 2.5D tạo cảm giác cầm thoải mái mà không bị cấn tay. Điện thoại này sẽ có số đo kích thước lần lượt là 145.6 x 70.3 x 8.3 mm và nặng 145 g. Hình ảnh thiết kế Xiaomi Mi 5s:Xiaomi Mi 5s sẽ bán ra với 4 màu Silver, Gray, Gold, Rose Gold Xiaomi Mi 5s sẽ bán ra với 4 màu Silver, Gray, Gold, Rose Gold Smartphone này cũng sử dụng cổng kết nối USB Type-C mới nhất Smartphone này cũng sử dụng cổng kết nối USB Type-C mới nhất Màn hình Xiaomi Mi 5s được vát cong 2.5D Màn hình Xiaomi Mi 5s được vát cong 2.5D Xiaomi Mi 5s được trang bị cảm biến vân tay siêu âm mới Xiaomi Mi 5s được trang bị cảm biến vân tay siêu âm mới Đánh giá màn hình Xiaomi Mi 5s:Màn hình Xiaomi Mi 5s có độ sáng lên đến 600nit Màn hình Xiaomi Mi 5s có độ sáng lên đến 600nit Về màn hình thì Xiaomi Mi 5s chĩnh hãng vẫn có kích thước tương tự người tiền nhiệm là 5.15 inches độ phân giải Full HD (1080 x 1920 pixels) và mật độ điểm ảnh là 428 ppi. Tấm nền IPS LCD quen thuộc cho hình ảnh hiển thị sắc nét, màu sắc chân thực. Đánh giá camera Xiaomi Mi 5s:Trong khi đó về khả năng chụp ảnh Xiaomi Mi 5s được trang bị camera chính dùng cảm biến Sony IMX 378 có độ phân giải 12 MP, khẩu độ f/2.0 cùng đèn dual-LED flash trợ sáng. Camera này cũng có khả năng lấy nét theo pha, nhận diện khuôn mặt, nụ cười, chụp panorama, auto-HDR và hỗ trợ quay video chất lượng 2160p@30fps. Ở mặt trước Xiaomi Mi 5s còn có camera phụ UltraPixel độ phân giải 4 MP, cùng khẩu độ f/2.0 cho góc rộng hỗ trợ tốt việc chụp ảnh 'tự sướng'Xiaomi Mi 5s đọ ảnh chụp cùng iPhone 6s Plus và Galaxy S7 Edge Xiaomi Mi 5s đọ ảnh chụp cùng iPhone 6s Plus và Galaxy S7 Edge Điện thoại Xiaomi Mi 5s hỗ trợ quay phim 4K Điện thoại Xiaomi Mi 5s hỗ trợ quay phim 4K Đánh giá cấu hình Xiaomi Mi 5s:Cung cấp sức mạnh cho điện thoại Xiaomi Mi 5s là bộ vi xử lý Qualcomm MSM8996 Snapdragon 821 4 nhân (với 2 nhân có tốc độ xung nhịp là 2.15 GHz Kryo và 2 nhân tốc độ 1.6 GHz Kryo) mới nhất hiện nay chỉ vừa xuất hiện trên LeEco Le Pro 3 ra mắt không lâu trước đó. Đi kèm theo đó là chip đồ họa Adreno 530. Cũng giống như sản phẩm tiền nhiệm Xiaomi Mi 5s sẽ có 2 phiên bản tùy chọn RAM 3 GB bộ nhớ trong lưu trữ 64 GB và RAM 4GB bộ nhớ trong tương ứng là 128 GB.",
    "discount": 6090000.0,
    "link": "https://shopee.vn/Xiaomi-Mi5s-64GB--%C4%90en--i.15748.175638206",
    "image": "http://cf.shopee.vn/file/e0e45887d41f8024f98cdf1ede10017f",
    "desc": "Xiaomi Mi 5s - Phiên bản nâng cấp hoàn hảo của Mi5Xiaomi Mi 5s cuối cùng cũng đã chính thức ra mắt vào ngày hôm nay 27/9/2016 đúng như thông tin mà hãng điện thoại Trung Quốc tiết lộ trước đó. Giống như tin đồn rò rỉ trước đó chiếc điện thoại thông minh Xiaomi Mi 5s được trang bị cảm biển siêu âm cùng nhiều tính năng mới mẽ. Xiaomi Mi 5s Xiaomi Mi 5s Không chỉ được trang bị nhiều tính năng mới mà mẫu flagship Xiaomi Mi 5s còn được trang bị cấu hình mạnh mẽ với chip Snapdragon 821 mới nhất, RAM 4/6GB đây được xem là bản nâng cấp đáng giá của Xiaomi Mi5 ra mắt trước đó. Đánh giá thiết kế Xiaomi Mi 5s: Cũng giống như những mẫu smartphone cao cấp gần đây của hãng Xiaomi Mi 5s vẫn được làm bằng bộ khung kim loại nguyên khối cao cấp và sang trọng. Mặt trước và sau của máy được bo cong 2.5D tạo cảm giác cầm thoải mái mà không bị cấn tay. Điện thoại này sẽ có số đo kích thước lần lượt là 145.6 x 70.3 x 8.3 mm và nặng 145 g. Hình ảnh thiết kế Xiaomi Mi 5s:Xiaomi Mi 5s sẽ bán ra với 4 màu Silver, Gray, Gold, Rose Gold Xiaomi Mi 5s sẽ bán ra với 4 màu Silver, Gray, Gold, Rose Gold Smartphone này cũng sử dụng cổng kết nối USB Type-C mới nhất Smartphone này cũng sử dụng cổng kết nối USB Type-C mới nhất Màn hình Xiaomi Mi 5s được vát cong 2.5D Màn hình Xiaomi Mi 5s được vát cong 2.5D Xiaomi Mi 5s được trang bị cảm biến vân tay siêu âm mới Xiaomi Mi 5s được trang bị cảm biến vân tay siêu âm mới Đánh giá màn hình Xiaomi Mi 5s:Màn hình Xiaomi Mi 5s có độ sáng lên đến 600nit Màn hình Xiaomi Mi 5s có độ sáng lên đến 600nit Về màn hình thì Xiaomi Mi 5s chĩnh hãng vẫn có kích thước tương tự người tiền nhiệm là 5.15 inches độ phân giải Full HD (1080 x 1920 pixels) và mật độ điểm ảnh là 428 ppi. Tấm nền IPS LCD quen thuộc cho hình ảnh hiển thị sắc nét, màu sắc chân thực. Đánh giá camera Xiaomi Mi 5s:Trong khi đó về khả năng chụp ảnh Xiaomi Mi 5s được trang bị camera chính dùng cảm biến Sony IMX 378 có độ phân giải 12 MP, khẩu độ f/2.0 cùng đèn dual-LED flash trợ sáng. Camera này cũng có khả năng lấy nét theo pha, nhận diện khuôn mặt, nụ cười, chụp panorama, auto-HDR và hỗ trợ quay video chất lượng 2160p@30fps. Ở mặt trước Xiaomi Mi 5s còn có camera phụ UltraPixel độ phân giải 4 MP, cùng khẩu độ f/2.0 cho góc rộng hỗ trợ tốt việc chụp ảnh 'tự sướng'Xiaomi Mi 5s đọ ảnh chụp cùng iPhone 6s Plus và Galaxy S7 Edge Xiaomi Mi 5s đọ ảnh chụp cùng iPhone 6s Plus và Galaxy S7 Edge Điện thoại Xiaomi Mi 5s hỗ trợ quay phim 4K Điện thoại Xiaomi Mi 5s hỗ trợ quay phim 4K Đánh giá cấu hình Xiaomi Mi 5s:Cung cấp sức mạnh cho điện thoại Xiaomi Mi 5s là bộ vi xử lý Qualcomm MSM8996 Snapdragon 821 4 nhân (với 2 nhân có tốc độ xung nhịp là 2.15 GHz Kryo và 2 nhân tốc độ 1.6 GHz Kryo) mới nhất hiện nay chỉ vừa xuất hiện trên LeEco Le Pro 3 ra mắt không lâu trước đó. Đi kèm theo đó là chip đồ họa Adreno 530. Cũng giống như sản phẩm tiền nhiệm Xiaomi Mi 5s sẽ có 2 phiên bản tùy chọn RAM 3 GB bộ nhớ trong lưu trữ 64 GB và RAM 4GB bộ nhớ trong tương ứng là 128 GB.",
    "category_id": "",
    "brand": "",
    "shop_name": "",
    "shop_id": "",
    "category_name": "Mobile & Accessories"
}
```

Mô tả kết quả

| **Tham số** | Mô tả                   |
| ----------- | ----------------------- |
| name        | tên sản phẩm            |
| price       | giá sản phẩm            |
| short\_desc | mô tả sản phẩm          |
| discount    | khuyến mại              |
| link        | link sản phẩm           |
| image       | link ảnh                |
| desc        | mô tả chi tiết sản phẩm |
| shop\_id    | ID của shop             |
| shop\_name  | Tên shop                |

<br>


# Lấy thông tin datafeeds

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/datafeeds
```

Các biến params được truyền vào HTTP Request theo các cặp Key-Value, mở đầu chuỗi params bằng dấu “?” và giữa các biến phân tách nhau bằng dấu “&”. Vd:

```
https://api.accesstrade.vn/v1/datafeeds?domain=lazada.vn&sku=AN273FAAA1FXLXVNAMZ-2293380
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Biến params            | Required | Mô tả                                                                        |
| ---------------------- | -------- | ---------------------------------------------------------------------------- |
| campaign               | tùy chọn | Merchant của owner sản phẩm. vd: lazada                                      |
| domain                 | tùy chọn | Domain của owner sản phẩm. vd: lazada.vn                                     |
| discount\_amount\_from | tùy chọn | lọc giá được giảm (chiết khấu) từ                                            |
| discount\_amount\_to   | tùy chọn | lọc giá được giảm (chiết khấu) đến                                           |
| discount\_rate\_from   | tùy chọn | lọc tỷ lệ giá được giảm từ                                                   |
| discount\_rate\_to     | tùy chọn | lọc tỷ lệ giá được giảm đến                                                  |
| page                   | tùy chọn | Nhập số thứ tự page lấy ra, max = total/limit. Mặc định = 1                  |
| limit                  | tùy chọn | Số lượng sản phẩm cần lấy, mặc định là 50, max = 200                         |
| price\_from            | tùy chọn | lọc giá ban đầu từ                                                           |
| price\_to              | tùy chọn | lọc giá ban đầu đến                                                          |
| discount\_from         | tùy chọn | lọc giá khuyến mại từ                                                        |
| discount\_to           | tùy chọn | lọc giá khuyến mại đến                                                       |
| status\_discount       | tùy chọn | lọc theo trạng thái khuyến mại. 0 - không được khuyến mại, 1 - có khuyến mại |
| update\_from           | tùy chọn | lọc theo thời gian update datafeed từ. vd: 08-09-2017                        |
| update\_to             | tùy chọn | lọc theo thời gian update datafeed đến. vd: 10-09-2017                       |

#### Mô tả kết quả <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Key              | Mô tả                                                       |
| ---------------- | ----------------------------------------------------------- |
| cate             | Danh mục sản phẩm                                           |
| desc             | Mô tả chi tiết sản phẩm                                     |
| discount         | giá sau khuyến mại                                          |
| campaign         | chiến dịch                                                  |
| domain           | domain của owner sản phẩm                                   |
| image            | url ảnh sản phẩm                                            |
| name             | tên sản phẩm                                                |
| price            | giá sản phẩm trước khuyến mại                               |
| product\_id      | id của sản phẩm                                             |
| sku              | mã sản phẩm                                                 |
| url              | link sản phẩm                                               |
| aff\_link        | Deep link                                                   |
| status\_discount | trạng thái khuyến mại. 0 - ko khuyến mại, 1 - có khuyến mại |
| discount\_amount | giá được giảm                                               |
| discount\_rate   | phần trăm được giảm                                         |
| update\_time     | thời gian update                                            |

> API response trả về

```
{
    "data": [
        {
            "aff_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https%3A%2F%2Fwww.lazada.vn%2Fao-thun-cao-cap-hinh-star-wars-coffee-mitadi-aste072-2423013.html",
            "campaign": "lazadaapp",
            "cate": "thoi-trang-my-pham",
            "desc": null,
            "discount": 175000.0,
            "discount_amount": 0.0,
            "discount_rate": 0.0,
            "domain": "lazada.vn",
            "image": "https://vn-live-01.slatic.net/p/7/ao-thun-cao-cap-hinh-star-wars-coffee-mitadi-aste072-1479373990-3103242-3b4b9c7018198c05f648390fb741036c-product.jpg",
            "merchant": "lazadaapp",
            "name": "Áo Thun Cao Cấp Hình Star Wars Coffee - MITADI – ASTE072",
            "price": 175000.0,
            "product_id": "224_AN273FAAA1FXLXVNAMZ-2293380",
            "promotion": null,
            "sku": "AN273FAAA1FXLXVNAMZ-2293380",
            "status_discount": 0,
            "update_time": "24-07-2018T01:02:19",
            "url": "https://www.lazada.vn/ao-thun-cao-cap-hinh-star-wars-coffee-mitadi-aste072-2423013.html"
        }
    ],
    "total": 1
}
```


# Tích hợp API Publisher AT cho chiến dịch TikTok Shop


# Version 1


# Create link-v1

#### POST

<https://api.accesstrade.vn/v1/tiktokshop\\_product\\_feeds/create\\_link>

#### Create TikTokShop Product Feed Link

This endpoint allows the creation of a TikTokShop product feed link.

**Request Body**

* `product_url` (string): The URL of the product.
* `product_id` (string): The ID of the product.
* `utm_source` (string) - optional: tracking param publisher put in
* `utm_medium` (string) - optional: tracking param publisher put in
* `utm_campaign` (string) - optional: tracking param publisher put in
* `utm_content` (string) - optional: tracking param publisher put in
* sub\_1 (string) - optional: tracking param publisher put in
* sub\_2 (string) - optional: tracking param publisher put in
* sub\_3 (string) - optional: tracking param publisher put in
* sub\_4 (string) - optional: tracking param publisher put in

**Response**

* Status: 200
* Content-Type: application/json

**Successful Response**

json

```json
{
    "data": {
        "aff_short_url": "",
        "aff_url": ""
    },
    "status": true,
    "message": ""
}
```

* `data` (object):
  * `aff_short_url` (string): Shortened affiliate link.
  * `aff_url` (string): Full affiliate link.
* `status` (boolean): Indicates the status of the request.

**Unsuccessful Response**

json

```json
{
    "data": {
        "aff_short_url": "",
        "aff_url": ""
    },
    "status": false,
    "message": ""
}
```

* `data` (object):
  * `aff_short_url` (string): Shortened affiliate link.
  * `aff_url` (string): Full affiliate link.
* `status` (boolean): Indicates the status of the request.

| **Tên Header**       | **Giá trị**                                                                                                             |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `accept`             | application/json, text/plain, */*                                                                                       |
| `accept-language`    | en-US,en;q=0.6                                                                                                          |
| `authorization`      | Token xxx(Token lấy tại: <https://pub2.accesstrade.vn/profile/api_key>)                                                 |
| `content-type`       | application/json                                                                                                        |
| `origin`             | [https://pub2.accesstrade.vn](https://pub2.accesstrade.vn/)                                                             |
| `priority`           | u=1, i                                                                                                                  |
| `referer`            | <https://pub2.accesstrade.vn/>                                                                                          |
| `sec-ch-ua`          | "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"                                                               |
| `sec-ch-ua-mobile`   | ?0                                                                                                                      |
| `sec-ch-ua-platform` | "macOS"                                                                                                                 |
| `sec-fetch-dest`     | empty                                                                                                                   |
| `sec-fetch-mode`     | cors                                                                                                                    |
| `sec-fetch-site`     | same-site                                                                                                               |
| `sec-gpc`            | 1                                                                                                                       |
| `user-agent`         | Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 |

Body&#x20;raw (json)

```json
{
    "product_url": "https://shop.tiktok.com/view/product/1731928656336816836?region=VN&local=en", 
    "product_id": "1731928656336816836",
    "utm_source": "congtyPhongVien",
    "utm_medium": "hehe",
    "utm_campaign": "ThangLong",
    "utm_content": "PhongVien123",
    "sub1": "doraemon",
    "sub2": "nobita",
    "sub3": "shizuka",
    "sub4": "suneo"
}
```

#### \[Example] Tiktok product search

```curl
curl --location 'https://api.accesstrade.vn/v1/tiktokshop_product_feeds?sort_field=units_sold&sort_order=DESC&limit=20&title_keywords=Kh%C4%83n%20gi%E1%BA%A5y%20&title_keywords=Kh%C4%83n%20%C6%B0%E1%BB%9Bt&amount_ge=50000&amount_lt=100000' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.6' \
--header 'authorization: Token bg1F-zURtCYDWH8KB79fLS5abjIyOg0G' \
--header 'content-type: application/json' \
--header 'origin: https://pub2.accesstrade.vn' \
--header 'priority: u=1, i' \
--header 'referer: https://pub2.accesstrade.vn/' \
--header 'sec-ch-ua: "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-site' \
--header 'sec-gpc: 1' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36' \
--data ''
```

#### Example Response

json

```
{
  "data": {
    "next_page_token": "b2Zmc2V0PTIw",
    "products": [
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "851976",
            "is_leaf": false,
            "local_name": "Bathroom Supplies",
            "parent_id": "600001"
          },
          {
            "id": "810888",
            "is_leaf": true,
            "local_name": "Towels",
            "parent_id": "851976"
          }
        ],
        "commission": {
          "amount": "5900",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729427764380338718?region=VN&local=en",
        "has_inventory": true,
        "id": "1729427764380338718",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/0098cbdfcf7f470daff5f8df910e1953~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "109000",
          "minimum_amount": "80000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "89000",
          "minimum_amount": "59000"
        },
        "shop": {
          "name": "Royal Towel"
        },
        "title": "Khăn tắm Royal  với kích thước 50x100cm hoặc 60x120cm dùng cho Spa, Khách sạn, nhà tắm không đổ lông, thấm hút tốt, không phai màu",
        "units_sold": 399923
      },
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "852232",
            "is_leaf": false,
            "local_name": "Home Care Supplies",
            "parent_id": "600001"
          },
          {
            "id": "993544",
            "is_leaf": true,
            "local_name": "Tissues & Napkins",
            "parent_id": "852232"
          }
        ],
        "commission": {
          "amount": "8500",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729576844352588386?region=VN&local=en",
        "has_inventory": true,
        "id": "1729576844352588386",
        "main_image_url": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/23c1ed3bc0324a2db388e0ccf1f752df~tplv-aphluv4xwc-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "203000",
          "minimum_amount": "118000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "139000",
          "minimum_amount": "85000"
        },
        "shop": {
          "name": "Top Gia Hồ Chí Minh"
        },
        "title": "(Tặng 10 gói ) 20 Gói Giấy ăn rút 3 màu mềm mịn, khăn rút 4 Lớp siêu dai mềm mịn, giấy vệ sinh Top Gia, tiện lợi Khăn giấy giấy vệ sinh",
        "units_sold": 343733
      },
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "852232",
            "is_leaf": false,
            "local_name": "Home Care Supplies",
            "parent_id": "600001"
          },
          {
            "id": "993544",
            "is_leaf": true,
            "local_name": "Tissues & Napkins",
            "parent_id": "852232"
          }
        ],
        "commission": {
          "amount": "9500",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1730311628372281700?region=VN&local=en",
        "has_inventory": true,
        "id": "1730311628372281700",
        "main_image_url": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/35752046950c4487a6600ee37c21ca2a~tplv-aphluv4xwc-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "203000",
          "minimum_amount": "159000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "144000",
          "minimum_amount": "95000"
        },
        "shop": {
          "name": "TOPGIA Hồ Chí Minh"
        },
        "title": "FS(Đa Kho) Giấy ăn rút TOP GIA thành phần bột gỗ tự nhiên 4 lớp giấy dai dày mềm mại Giấy Vệ Sinh 3 màu giấy rút lụa, giấy gấu trúc",
        "units_sold": 223603
      },
      {
        "category_chains": [
          {
            "id": "605196",
            "is_leaf": false,
            "local_name": "Automotive & Motorcycle",
            "parent_id": "0"
          },
          {
            "id": "940808",
            "is_leaf": false,
            "local_name": "Car Washing & Maintenance",
            "parent_id": "605196"
          },
          {
            "id": "945544",
            "is_leaf": true,
            "local_name": "Paint Care",
            "parent_id": "940808"
          }
        ],
        "commission": {
          "amount": "5346",
          "currency": "VND",
          "rate": 900
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729671631378352218?region=VN&local=en",
        "has_inventory": true,
        "id": "1729671631378352218",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/654a0bd623384010b815645627686144~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "75000",
          "minimum_amount": "75000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "59400",
          "minimum_amount": "59400"
        },
        "shop": {
          "name": "Dầu Nhớt Võ Gia"
        },
        "title": "Sprayking chai phục hồi nhựa xe máy oto 400ml dạng xịt + khăn 30x30 vàng xám",
        "units_sold": 178565
      },
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "852104",
            "is_leaf": false,
            "local_name": "Home Decor",
            "parent_id": "600001"
          },
          {
            "id": "600338",
            "is_leaf": true,
            "local_name": "Decorative Stickers",
            "parent_id": "852104"
          }
        ],
        "commission": {
          "amount": "3249.9",
          "currency": "VND",
          "rate": 500
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729594266258147764?region=VN&local=en",
        "has_inventory": true,
        "id": "1729594266258147764",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/c2af37f7b3df4cbfa6c49e8b01a746a6~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "89000",
          "minimum_amount": "89000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "64998",
          "minimum_amount": "64998"
        },
        "shop": {
          "name": "Trang Trí Quỳnh Finn"
        },
        "title": "Giấy dán tường xi măng 45cmx10m có sẵn keo - chống thấm nước rất tốt, Siêu đẹp và dễ dán",
        "units_sold": 180169
      },
      {
        "category_chains": [
          {
            "id": "700437",
            "is_leaf": false,
            "local_name": "Food & Beverages",
            "parent_id": "0"
          },
          {
            "id": "915336",
            "is_leaf": false,
            "local_name": "Snacks",
            "parent_id": "700437"
          },
          {
            "id": "922504",
            "is_leaf": true,
            "local_name": "Dried Snacks",
            "parent_id": "915336"
          }
        ],
        "commission": {
          "amount": "9600",
          "currency": "VND",
          "rate": 1200
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729664637783673199?region=VN&local=en",
        "has_inventory": true,
        "id": "1729664637783673199",
        "main_image_url": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/d0474650e3ab4d88b6b94f3af61afa49~tplv-aphluv4xwc-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "500000",
          "minimum_amount": "100000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "400000",
          "minimum_amount": "80000"
        },
        "shop": {
          "name": "Ăn Vặt Cùng Thiên An"
        },
        "title": "Thiên An Food TÓP MỠ RIM MẮM TỎI TÚI GIẤY LOẠI LIỀN DA giòn ăn kèm bánh tráng hoặc dùng trực tiếp Ăn Vặt Snack Food  đồ ăn nhẹ khô Thức Ăn com chay mam Cay tóp mỡ  thiên",
        "units_sold": 166351
      },
      {
        "category_chains": [
          {
            "id": "602284",
            "is_leaf": false,
            "local_name": "Baby & Maternity",
            "parent_id": "0"
          },
          {
            "id": "879112",
            "is_leaf": false,
            "local_name": "Baby Care & Health",
            "parent_id": "602284"
          },
          {
            "id": "892808",
            "is_leaf": true,
            "local_name": "Wipes & Holders",
            "parent_id": "879112"
          }
        ],
        "commission": {
          "amount": "2639.4",
          "currency": "VND",
          "rate": 300
        },
        "detail_link": "https://shop.tiktok.com/view/product/1731928656336816836?region=VN&local=en",
        "has_inventory": true,
        "id": "1731928656336816836",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/62e64e92b88642139d12e1cd46bd9654~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "88000",
          "minimum_amount": "88000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "87980",
          "minimum_amount": "87980"
        },
        "shop": {
          "name": "KT's Home Shop"
        },
        "title": "Thùng 10 bịch khăn ướt Baby Wipes 650g không mùi, không cồn an toàn cho bé.",
        "units_sold": 165790
      },
      {
        "category_chains": [
          {
            "id": "601152",
            "is_leaf": false,
            "local_name": "Womenswear & Underwear",
            "parent_id": "0"
          },
          {
            "id": "842248",
            "is_leaf": false,
            "local_name": "Women's Tops",
            "parent_id": "601152"
          },
          {
            "id": "601265",
            "is_leaf": true,
            "local_name": "Blouses & Shirts",
            "parent_id": "842248"
          }
        ],
        "commission": {
          "amount": "6230",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729605620980091387?region=VN&local=en",
        "has_inventory": true,
        "id": "1729605620980091387",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/1ce91a65b8b34cb892c97615fa2d4ec6~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "109000",
          "minimum_amount": "89000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "76300",
          "minimum_amount": "62300"
        },
        "shop": {
          "name": "Thảo.Clothing"
        },
        "title": "[ ÁO MỎNG ] ÁO THUN COTTON GIẤY CỔ TIM FROM RỘNG MỎNG nhiều màu Nữ Top Women",
        "units_sold": 105880
      },
      {
        "category_chains": [
          {
            "id": "602284",
            "is_leaf": false,
            "local_name": "Baby & Maternity",
            "parent_id": "0"
          },
          {
            "id": "879112",
            "is_leaf": false,
            "local_name": "Baby Care & Health",
            "parent_id": "602284"
          },
          {
            "id": "892808",
            "is_leaf": true,
            "local_name": "Wipes & Holders",
            "parent_id": "879112"
          }
        ],
        "commission": {
          "amount": "7700",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1731011210781100859?region=VN&local=en",
        "has_inventory": true,
        "id": "1731011210781100859",
        "main_image_url": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/1e9b8fda617b438ca84e87906b4b97aa~tplv-aphluv4xwc-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "154000",
          "minimum_amount": "154000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "77000",
          "minimum_amount": "77000"
        },
        "shop": {
          "name": "Giấy Ướt Cho Bé Yêu"
        },
        "title": "[Bịch TO 625gram] Combo 10 bịch khăn ướt cao cấp Babywis khổ giấy thực tế 18x24cm vải bi mềm mại không mùi không cồn không chất tẩy an toàn cho da bé - date 2/2025-2/2028",
        "units_sold": 104164
      },
      {
        "category_chains": [
          {
            "id": "601450",
            "is_leaf": false,
            "local_name": "Beauty & Personal Care",
            "parent_id": "0"
          },
          {
            "id": "848776",
            "is_leaf": false,
            "local_name": "Skincare",
            "parent_id": "601450"
          },
          {
            "id": "601616",
            "is_leaf": true,
            "local_name": "Face Masks",
            "parent_id": "848776"
          }
        ],
        "commission": {
          "amount": "4675",
          "currency": "VND",
          "rate": 500
        },
        "detail_link": "https://shop.tiktok.com/view/product/1730347127927769223?region=VN&local=en",
        "has_inventory": true,
        "id": "1730347127927769223",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/2105807c22594c2fb2bfd221870801f3~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "445000",
          "minimum_amount": "179000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "265000",
          "minimum_amount": "93500"
        },
        "shop": {
          "name": "DNGSunflower93"
        },
        "title": "Combo 3 hộp mặt nạ giấy COLORKEY LUMINOUS Vitamin B5 Giúp Cấp Ẩm, Hỗ Trợ Phục Hồi Làn Da, Hỗ Trợ Sáng Da",
        "units_sold": 104946
      },
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "852232",
            "is_leaf": false,
            "local_name": "Home Care Supplies",
            "parent_id": "600001"
          },
          {
            "id": "600812",
            "is_leaf": true,
            "local_name": "Household Cleaners",
            "parent_id": "852232"
          }
        ],
        "commission": {
          "amount": "5000",
          "currency": "VND",
          "rate": 500
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729734820266281725?region=VN&local=en",
        "has_inventory": true,
        "id": "1729734820266281725",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/321ec4520f1548cdb1d4a2219a45e5ac~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "169000",
          "minimum_amount": "169000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "100000",
          "minimum_amount": "100000"
        },
        "shop": {
          "name": "TT79.Store"
        },
        "title": "Thùng 4 Túi Giấy Ăn Treo Tường Natural tặng móc, Giấy Rút Treo Tường 4 Lớp Bằng Bột Gỗ Nguyên Sinh Hàng Nội Địa Trung Khăn Giấy Giấy Vệ Sinh",
        "units_sold": 99531
      },
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "852232",
            "is_leaf": false,
            "local_name": "Home Care Supplies",
            "parent_id": "600001"
          },
          {
            "id": "993544",
            "is_leaf": true,
            "local_name": "Tissues & Napkins",
            "parent_id": "852232"
          }
        ],
        "commission": {
          "amount": "7600",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729447573105641637?region=VN&local=en",
        "has_inventory": true,
        "id": "1729447573105641637",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/b2dafab6908d4bb3bd9983ff02836650~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "104000",
          "minimum_amount": "104000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "76000",
          "minimum_amount": "76000"
        },
        "shop": {
          "name": "Gumivn"
        },
        "title": "GU03-Thùng 16 gói giấy ăn cao cấp Gumi 3 lớp / 4 lớp mềm mịn, tiện lợi Khăn Giấy để Phòng Khách",
        "units_sold": 92905
      },
      {
        "category_chains": [
          {
            "id": "605196",
            "is_leaf": false,
            "local_name": "Automotive & Motorcycle",
            "parent_id": "0"
          },
          {
            "id": "940808",
            "is_leaf": false,
            "local_name": "Car Washing & Maintenance",
            "parent_id": "605196"
          },
          {
            "id": "945544",
            "is_leaf": true,
            "local_name": "Paint Care",
            "parent_id": "940808"
          }
        ],
        "commission": {
          "amount": "5890",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729605492879100198?region=VN&local=en",
        "has_inventory": true,
        "id": "1729605492879100198",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/93b4c2e5a0804f32b3c4c0c364215a63~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "63000",
          "minimum_amount": "58900"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "63000",
          "minimum_amount": "58900"
        },
        "shop": {
          "name": "Dầu Nhớt 20"
        },
        "title": "[Mẫu mới] Combo chai xịt phục hồi nhựa nhám sprayking mẫu mới phục hồi nhựa xe, sơn bóng xe kèm 1 khăn vàng xám 30x30 siêu mịn chaixit  nhuaxemay",
        "units_sold": 90073
      },
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "852232",
            "is_leaf": false,
            "local_name": "Home Care Supplies",
            "parent_id": "600001"
          },
          {
            "id": "993544",
            "is_leaf": true,
            "local_name": "Tissues & Napkins",
            "parent_id": "852232"
          }
        ],
        "commission": {
          "amount": "9900",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1730421431227877882?region=VN&local=en",
        "has_inventory": true,
        "id": "1730421431227877882",
        "main_image_url": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/5ef2887b138a4e679d64e54e958bfb6a~tplv-aphluv4xwc-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "155000",
          "minimum_amount": "155000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "99000",
          "minimum_amount": "99000"
        },
        "shop": {
          "name": "botare"
        },
        "title": "【5 Bịch】Botare Cheerful khăn giấy vệ sinh treo tường lớn 1000 tờ mỗi gói 4 lớp 140*175mm",
        "units_sold": 98188
      },
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "852104",
            "is_leaf": false,
            "local_name": "Home Decor",
            "parent_id": "600001"
          },
          {
            "id": "600338",
            "is_leaf": true,
            "local_name": "Decorative Stickers",
            "parent_id": "852104"
          }
        ],
        "commission": {
          "amount": "3249.9",
          "currency": "VND",
          "rate": 500
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729594599445531060?region=VN&local=en",
        "has_inventory": true,
        "id": "1729594599445531060",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/03366b8caead408ba8ccdb71e715ae39~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "89000",
          "minimum_amount": "89000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "64998",
          "minimum_amount": "64998"
        },
        "shop": {
          "name": "Trang Trí Quỳnh Finn"
        },
        "title": "Giấy dán tường màu có sẵn keo khổ 45cm x 10m, decal Pastel một màu trắng xám ghi hồng xanh kem nhám xanh",
        "units_sold": 83839
      },
      {
        "category_chains": [
          {
            "id": "604968",
            "is_leaf": false,
            "local_name": "Home Improvement",
            "parent_id": "0"
          },
          {
            "id": "872968",
            "is_leaf": false,
            "local_name": "Building Supplies",
            "parent_id": "604968"
          },
          {
            "id": "897160",
            "is_leaf": true,
            "local_name": "Wallpaper & Wall Trim",
            "parent_id": "872968"
          }
        ],
        "commission": {
          "amount": "2240",
          "currency": "VND",
          "rate": 400
        },
        "detail_link": "https://shop.tiktok.com/view/product/1730366589222947064?region=VN&local=en",
        "has_inventory": true,
        "id": "1730366589222947064",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/c48b8ac99614472ba3a494c985d1613d~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "74000",
          "minimum_amount": "74000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "57000",
          "minimum_amount": "56000"
        },
        "shop": {
          "name": "NADY HOME"
        },
        "title": "Giấy dán tường xi măng 45cmx10m có sẵn keo - chống thấm nước rất tốt, Siêu đẹp và dễ dán vn đám mây xanh",
        "units_sold": 82019
      },
      {
        "category_chains": [
          {
            "id": "601450",
            "is_leaf": false,
            "local_name": "Beauty & Personal Care",
            "parent_id": "0"
          },
          {
            "id": "849160",
            "is_leaf": false,
            "local_name": "Bath & Body Care",
            "parent_id": "601450"
          },
          {
            "id": "601495",
            "is_leaf": true,
            "local_name": "Hair Removal Cream, Wax & Shave",
            "parent_id": "849160"
          }
        ],
        "commission": {
          "amount": "5849.900000000001",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729432588150606118?region=VN&local=en",
        "has_inventory": true,
        "id": "1729432588150606118",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/3be812da87ec4bf29b5debf19757e3f5~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "110000",
          "minimum_amount": "110000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "58499",
          "minimum_amount": "58499"
        },
        "shop": {
          "name": "An Lành - Cosmectic Organic"
        },
        "title": "Sáp Wax Lông An Lành PHIÊN BẢN NÂNG CẤP, AL AN LANH - Giật Lông Tận Gốc [ Gồm 1 wax 350gr + 2 que và 50 giấy ]",
        "units_sold": 77450
      },
      {
        "category_chains": [
          {
            "id": "602284",
            "is_leaf": false,
            "local_name": "Baby & Maternity",
            "parent_id": "0"
          },
          {
            "id": "879112",
            "is_leaf": false,
            "local_name": "Baby Care & Health",
            "parent_id": "602284"
          },
          {
            "id": "892296",
            "is_leaf": true,
            "local_name": "Towels & Shower Caps",
            "parent_id": "879112"
          }
        ],
        "commission": {
          "amount": "8400",
          "currency": "VND",
          "rate": 1200
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729432618710108897?region=VN&local=en",
        "has_inventory": true,
        "id": "1729432618710108897",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/aa0a0e622d42460ab60ee5b772e728ad~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "78000",
          "minimum_amount": "78000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "70000",
          "minimum_amount": "70000"
        },
        "shop": {
          "name": "Kho Tổng Sơ Sinh Mẹ Bé"
        },
        "title": "( Được Chọn Mẫu )  Khăn Tắm 6 Lớp Xô Nhăn - Chất Liệu Xô Mềm Mại Thấm Hút Tốt Dành Cho Bé Size 105X105 cm Voi",
        "units_sold": 78730
      },
      {
        "category_chains": [
          {
            "id": "600001",
            "is_leaf": false,
            "local_name": "Home Supplies",
            "parent_id": "0"
          },
          {
            "id": "851976",
            "is_leaf": false,
            "local_name": "Bathroom Supplies",
            "parent_id": "600001"
          },
          {
            "id": "810888",
            "is_leaf": true,
            "local_name": "Towels",
            "parent_id": "851976"
          }
        ],
        "commission": {
          "amount": "6999.900000000001",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1730942694879759160?region=VN&local=en",
        "has_inventory": true,
        "id": "1730942694879759160",
        "main_image_url": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/7c8b95fc3e7b4173bc523f8f326b2fd0~tplv-aphluv4xwc-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "280000",
          "minimum_amount": "140000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "138000",
          "minimum_amount": "69999"
        },
        "shop": {
          "name": "Khăn Bông Huy Hoà"
        },
        "title": "Khăn tắm sóng nước kích thước 70x140cm Huy Hòa Towel. Mềm mịn, thấm hút tốt, không ra màu, không xù lông - Dùng cho Nhà Tắm, Phòng Tắm",
        "units_sold": 74833
      },
      {
        "category_chains": [
          {
            "id": "601450",
            "is_leaf": false,
            "local_name": "Beauty & Personal Care",
            "parent_id": "0"
          },
          {
            "id": "848776",
            "is_leaf": false,
            "local_name": "Skincare",
            "parent_id": "601450"
          },
          {
            "id": "601733",
            "is_leaf": true,
            "local_name": "Skincare Tools",
            "parent_id": "848776"
          }
        ],
        "commission": {
          "amount": "8300",
          "currency": "VND",
          "rate": 1000
        },
        "detail_link": "https://shop.tiktok.com/view/product/1729725364849642183?region=VN&local=en",
        "has_inventory": true,
        "id": "1729725364849642183",
        "main_image_url": "https://p16-oec-va.ibyteimg.com/tos-maliva-i-o3syd03w52-us/8457e529dfbd42ea9fdd84b6cb1f39db~tplv-o3syd03w52-origin-webp.webp?from=3377431861",
        "original_price": {
          "currency": "VND",
          "maximum_amount": "258000",
          "minimum_amount": "139000"
        },
        "sale_region": "VN",
        "sales_price": {
          "currency": "VND",
          "maximum_amount": "161000",
          "minimum_amount": "83000"
        },
        "shop": {
          "name": "Tổng Kho AnNa"
        },
        "title": "[Combo 5-10 Gói] Khăn lau mặt bông tờ dạng cuộn cao cấp, khăn mặt dùng 1 lần - 40 khăn/gói kích cỡ 20x20cm KL01",
        "units_sold": 73875
      }
    ],
    "total_count": 10000
  },
  "status": true
}
```


# Tiktok product search-v1

#### GET - Tiktok product search

<https://api.accesstrade.vn/v1/tiktokshop\\_product\\_feeds?sort\\_field=units\\_sold\\&limit=20\\&title\\_keywords=Khăn> giấy \&title\_keywords=Khăn ướt

#### Tiktok product search

This endpoint retrieves TikTok shop product feeds with the option to sort by units sold, limit the number of results, and filter by title keywords.

**Parameters**

* `sort_field` (query parameter, required): Specifies the field to sort the results by.
  * `commission` : hoa hồng
  * `units_sold`: số lượng bán
  * `product_sales_price`: giá bán
  * `commission_rate`: Tỉ lệ hoa hồng
* `limit` (query parameter, required): Limits the number of results to be returned. In this example, the value is `20`.
* `title_keywords` (query parameter, required): Filters the results by title keywords. In this example, the values are `Khăn giấy` and `Khăn ướt`.

**Response**

Upon a successful request, the server returns a JSON object with the following structure:

```json
{
    "data": {
        "next_page_token": "",
        "products": [
            {
                "category_chains": [
                    {
                        "id": "",
                        "is_leaf": true,
                        "local_name": "",
                        "parent_id": ""
                    }
                ],
                "commission": {
                    "amount": "",
                    "currency": "",
                    "rate": 0
                },
                "detail_link": "",
                "has_inventory": true,
                "id": "",
                "main_image_url": "",
                "original_price": {
                    "currency": "",
                    "maximum_amount": "",
                    "minimum_amount": ""
                },
                "sale_region": "",
                "sales_price": {
                    "currency": "",
                    "maximum_amount": "",
                    "minimum_amount": ""
                },
                "shop": {
                    "name": ""
                },
                "title": "",
                "units_sold": 0
            }
        ],
        "total_count": 0
    },
    "status": true
}
```

The `data` object contains the retrieved product feeds, including the `products` array, which holds the details of each product. The `total_count` indicates the total number of products available.

```
data
├── products: []
│   └── object (A list of products.)
├── shop: object
│   ├── name: string (The TikTok Shop name.)
│   └── id: string (The product identifier.)
├── has_inventory: bool (Set to true if there are more than zero units of the product in inventory. Set to false if there are zero units in inventory.)
├── units_sold: int (Total number of units sold. Units are indexed to SKU. Note that if the creator has not given permission for precise data sharing, this property will not be present.)
├── title: string (The product name.)
├── sale_region: string (The region where the product is offered for sale.)
├── main_image_url: string (The product image URL.)
├── detail_link: string (The URL for the product's detail page.)
├── original_price: object
│   ├── currency: string (The currency code.)
│   ├── minimum_amount: string (The lowest original price of all SKUs of the product.)
│   └── maximum_amount: string (The highest original price of all SKUs of the product.)
├── category_chains: []
│   └── object (A list of categories associated with the product. Maximum length of the list is 3 categories.)
│       ├── id: string (The category identifier.)
│       ├── local_name: string (The name of the product in the category.)
│       ├── is_leaf: bool (Set to true if this category is a leaf node. Set to false if not.)
│       └── parent_id: string (The category identifier of the parent category.)
├── commission: object
│   ├── rate: int (The commission rate in hundredths of a percent. For example, 3587 is a commission rate of 35.87%. This value must a minimum of 1000. The range of this value is [100, 8000].)
│   ├── currency: string (The currency code.)
│   └── amount: string (The commission amount.)
├── sales_price: object
│   ├── currency: string (The currency code.)
│   ├── minimum_amount: string (The lowest promotion price of all SKUs of this product.)
│   └── maximum_amount: string (The highest promotion price of all SKUs of this product.)
├── next_page_token: string (An opaque token used to retrieve the next page of a paginated result set.)
└── total_count: int (Total count of products meeting the search criteria expressed in the request body.)
```

**Example**

```http
GET https://api-v1.dev.accesstrade.me/v1/tiktokshop_product_feeds?sort_field=units_sold&limit=20&title_keywords=Khăn giấy &title_keywords=Khăn ướt
```

| **Tên Header**     | **Giá trị**                                                                                                             |
| ------------------ | ----------------------------------------------------------------------------------------------------------------------- |
| accept             | application/json, text/plain, */*                                                                                       |
| accept-language    | en-US,en;q=0.6                                                                                                          |
| authorization      | Token xxxx (Token của user lấy tại <https://pub2.accesstrade.vn/profile/api_key>)                                       |
| content-type       | application/json                                                                                                        |
| origin             | [https://pub2.accesstrade.vn](https://pub2.accesstrade.vn/)                                                             |
| priority           | u=1, i                                                                                                                  |
| referer            | <https://pub2.accesstrade.vn/>                                                                                          |
| sec-ch-ua          | "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"                                                               |
| sec-ch-ua-mobile   | ?0                                                                                                                      |
| sec-ch-ua-platform | "macOS"                                                                                                                 |
| sec-fetch-dest     | empty                                                                                                                   |
| sec-fetch-mode     | cors                                                                                                                    |
| sec-fetch-site     | same-site                                                                                                               |
| sec-gpc            | 1                                                                                                                       |
| user-agent         | Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 |

| **Tên Tham Số (Param)** | **Giá Trị** | **Ghi Chú**                                                                                                             |
| ----------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------- |
| sort\_field             | units\_sold | - `commission`: hoa hồng- `units_sold`: số lượng bán- `product_sales_price`: giá bán- `commission_rate`: Tỉ lệ hoa hồng |
| limit                   | 20          | Số lượng kết quả trả về                                                                                                 |
| title\_keywords         | Khăn giấy   | Từ khóa tìm kiếm sản phẩm                                                                                               |
| title\_keywords         | Khăn ướt    | Có thể gửi nhiều `title_keywords`                                                                                       |
| page\_token             |             | Token của trang tiếp theo, lấy từ trường `"next_page_token"` trong response                                             |


# Version 2-updated version


# Create link-v2

#### POST

<https://api.accesstrade.vn/v2/tiktokshop\\_product\\_feeds/create\\_link>

#### Create TikTokShop Product Feed Link

This endpoint allows the creation of a TikTokShop product feed link.

**Request Body**

* product\_url (string): The URL of the product.
* product\_id (string)- optional: The ID of the product.
* utm\_source (string) - optional: tracking param
* publisher put in
* utm\_medium (string) - optional: tracking param
* publisher put in
* utm\_campaign (string) - optional: tracking param
* publisher put in
* utm\_content (string) - optional: tracking param
* publisher put in
* sub\_1 (string) - optional: tracking param publisher put in
* sub\_2 (string) - optional: tracking param publisher put in
* sub\_3 (string) - optional: tracking param publisher put in
* sub\_4 (string) - optional: tracking param publisher put in

#### \[Example] create link

```curl
curl --location -g '{{local}}/v2/tiktokshop_product_feeds/create_link' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.6' \
--header 'authorization: Token bg1F-zURtCYDWH8KB79fLS5abjIyOg0G' \
--header 'content-type: application/json' \
--header 'origin: https://pub2.accesstrade.vn' \
--header 'priority: u=1, i' \
--header 'referer: https://pub2.accesstrade.vn/' \
--header 'sec-ch-ua: "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-site' \
--header 'sec-gpc: 1' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36' \
--data '{
    "product_url": "https://vt.tiktok.com/ZSBKCcJrf/", 
    // "product_id": "1729836100247522192", 
    "utm_source": "huongtest1",
    "utm_medium": "huongtest2",
    "utm_campaign": "huongtest3",
    "utm_content": "huongtest4",
    "sub1": "subhuong1",
    "sub2": "subhuong2",
    "sub3": "subhuong3",
    "sub4": "subhuong4"
}'
```

**Response**

* Status: 200
* Content-Type: application/json

#### Example Response

```json
{
  "data": {
    "aff_short_url": "https://shorten.dev.accesstrade.me/WxmudqdK",
    "aff_url": "https://tracking.dev.accesstrade.me/deep_link/4348611760548105593/6648523843406889655?utm_campaign=huongtest3&sub4=subhuong4&sub3=subhuong3&url=https%3A%2F%2Fwww.tiktok.com%2Ft%2FZSSRJsSvW%2F&utm_content=huongtest4&utm_source=huongtest1&utm_medium=huongtest2",
    "product_commission": {
      "amount": "3.000",
      "currency": "VND",
      "rate": 1500
    },
    "product_id": "1729836100247522192",
    "product_image": "https://p16-oec-sg.ibyteimg.com/tos-alisg-i-aphluv4xwc-sg/3d7083325a3c4221b94b3c25218818e4~tplv-aphluv4xwc-resize-jpeg:800:800.jpeg?dr=15584&from=604555543&idc=my&ps=933b5bde&shcp=32ce9e9e&shp=2408c917&t=555f072d",
    "product_name": "Ghim Tráng Men Hình Mèo, Tranh Sơn Dầu Nghệ Thuật Van Gogh, Ghim Cài Áo Hoa Hướng Dương Đêm Đầy Sao Anime, Huy Hiệu Kim Loại, Trâm Cài Ve Áo, Quà Tặng Trang Sức Cho Bạn Bè",
    "product_price": {
      "amount": "20000",
      "currency": "VND"
    }
  },
  "message": "create link affiliate success",
  "status": true
}
```

**Successful Response**

```json
{
    "data": {
        "aff_short_url": "",
        "aff_url": ""
    },
    "status": true,
    "message": ""
}
```

* `data` (object):
  * `aff_short_url` (string): Shortened affiliate link.
  * `aff_url` (string): Full affiliate link.
* `status` (boolean): Indicates the status of the request.

**Unsuccessful Response**

```json
{
    "data": {
        "aff_short_url": "",
        "aff_url": ""
    },
    "status": false,
    "message": ""
}
```

* `data` (object):
  * `aff_short_url` (string): Shortened affiliate link.
  * `aff_url` (string): Full affiliate link.
* `status` (boolean): Indicates the status of the request.

#### \[Example] Link sản phẩm không có trong chương trình aff

curl

```curl
curl --location -g '{{prod}}/v2/tiktokshop_product_feeds/create_link' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.6' \
--header 'authorization: Token bg1F-zURtCYDWH8KB79fLS5abjIyOg0G' \
--header 'content-type: application/json' \
--header 'origin: https://pub2.accesstrade.vn' \
--header 'priority: u=1, i' \
--header 'referer: https://pub2.accesstrade.vn/' \
--header 'sec-ch-ua: "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-site' \
--header 'sec-gpc: 1' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36' \
--data '{
    "product_url": "https://shop.tiktok.com/view/product/1732294586233555574?region=VN&local=en", 
    // "product_id": "1729836100247522192", 
    "utm_source": "huongtest1",
    "utm_medium": "huongtest2",
    "utm_campaign": "huongtest3",
    "utm_content": "huongtest4",
    "sub1": "subhuong1",
    "sub2": "subhuong2",
    "sub3": "subhuong3",
    "sub4": "subhuong4"
}'
```

Example Response

```javascript
{
  "data": {},
  "message": "The link is not part of the campaign",
  "status": false
}
```

| **Tên Header**         | **Giá trị**                                                                                                             |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **accept**             | application/json, text/plain, */*                                                                                       |
| **accept-language**    | en-US,en;q=0.6                                                                                                          |
| **authorization**      | Token bg1F-zURtCYDWH8KB79fLS5abjlyOg0G                                                                                  |
| **content-type**       | application/json                                                                                                        |
| **origin**             | [https://pub2.accesstrade.vn](https://pub2.accesstrade.vn/)                                                             |
| **priority**           | u=1, i                                                                                                                  |
| **referer**            | <https://pub2.accesstrade.vn/>                                                                                          |
| **sec-ch-ua**          | "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"                                                               |
| **sec-ch-ua-mobile**   | ?0                                                                                                                      |
| **sec-ch-ua-platform** | "macOS"                                                                                                                 |
| **sec-fetch-dest**     | empty                                                                                                                   |
| **sec-fetch-mode**     | cors                                                                                                                    |
| **sec-fetch-site**     | same-site                                                                                                               |
| **sec-gpc**            | 1                                                                                                                       |
| **user-agent**         | Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 |

Body&#x20;raw (json)

```json
{
    "product_url": "https://shop.tiktok.com/view/product/1732194463914036099?region=VN&local=en", 
    // "product_id": "1729836100247522192", 
    "utm_source": "huongtest1",
    "utm_medium": "huongtest2",
    "utm_campaign": "huongtest3",
    "utm_content": "huongtest4",
    "sub1": "subhuong1",
    "sub2": "subhuong2",
    "sub3": "subhuong3",
    "sub4": "subhuong4"
}
```

\*Để tối ưu thời gian tạo link, vui lòng tham khảo sử dụng:

**Query Params**

* minify: true (When this parameter is used, the API will return only affiliate link information and exclude product details to reduce the API’s response time.)

<https://api.accesstrade.vn/v2/tiktokshop_product_feeds/create_link?minify=true>


# Tiktok product search-v2

<https://api.accesstrade.vn/v2/tiktokshop\\_product\\_feeds?sort\\_field=HIGH\\_COMMISSION\\_RATE\\&limit=10\\&title\\_keywords=dép\\&page\\_token=b2Zmc2V0PTEw>

#### Tiktok product search

This endpoint retrieves TikTok shop product feeds with the option to sort by units sold, limit the number of results, and filter by title keywords.

**Parameters**

* `sort_field` (query parameter, required): Specifies the field to sort the results by.
  * 1\. "**RECOMMENDED**" Follow the algorithm recommended order
  * 2\. "**BEST\_SELLERS**" Sort by historical sold numbers from high to low
  * 3\. "**LOW\_PRICE**" Sort by price from low to high
  * 4\. "**HIGH\_PRICE**" Sort by price from high to low
  * 5\. "**NEWLY\_RELEASED**" Sort by the product edition time from late to early
  * 6\. "**HIGH\_COMMISSIOM\_RATE**" Sort by commission rate from high to low"
* `limit` (query parameter, required): Limits the number of results to be returned. In this example, the value is `20`.
* `title_keywords` (query parameter, required): Filters the results by title keywords. In this example, the values are `Khăn giấy` and `Khăn ướt`.

#### \[Example] Tiktok product search

```curl
curl --location -g '{{local}}/v2/tiktokshop_product_feeds?sort_field=RECOMMENDED&limit=10&title_keywords=tr%E1%BA%BB%20em&page_token=b2Zmc2V0PTEw&product_ids=1730264365926091505' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-US,en;q=0.6' \
--header 'authorization: Token {{token_local}} ' \
--header 'content-type: application/json' \
--header 'origin: https://pub2.accesstrade.vn' \
--header 'priority: u=1, i' \
--header 'referer: https://pub2.accesstrade.vn/' \
--header 'sec-ch-ua: "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-site' \
--header 'sec-gpc: 1' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36' \
--data ''
```

**Response**

Upon a successful request, the server returns a JSON object with the following structure:

```json
{
    "data": {
        "next_page_token": "",
        "products": [
            {
                "category_chains": [
                    {
                        "id": "",
                        "is_leaf": true,
                        "local_name": "",
                        "parent_id": ""
                    }
                ],
                "commission": {
                    "amount": "",
                    "currency": "",
                    "rate": 0
                },
                "detail_link": "",
                "has_inventory": true,
                "id": "",
                "main_image_url": "",
                "original_price": {
                    "currency": "",
                    "maximum_amount": "",
                    "minimum_amount": ""
                },
                "sale_region": "",
                "sales_price": {
                    "currency": "",
                    "maximum_amount": "",
                    "minimum_amount": ""
                },
                "shop": {
                    "name": ""
                },
                "title": "",
                "units_sold": 0
            }
        ],
        "total_count": 0
    },
    "status": true
}
```

The `data` object contains the retrieved product feeds, including the `products` array, which holds the details of each product. The `total_count` indicates the total number of products available.

```
data
├── products: []
│   └── object (A list of products.)
├── shop: object
│   ├── name: string (The TikTok Shop name.)
│   └── id: string (The product identifier.)
├── has_inventory: bool (Set to true if there are more than zero units of the product in inventory. Set to false if there are zero units in inventory.)
├── units_sold: int (Total number of units sold. Units are indexed to SKU. Note that if the creator has not given permission for precise data sharing, this property will not be present.)
├── title: string (The product name.)
├── sale_region: string (The region where the product is offered for sale.)
├── main_image_url: string (The product image URL.)
├── detail_link: string (The URL for the product's detail page.)
├── original_price: object
│   ├── currency: string (The currency code.)
│   ├── minimum_amount: string (The lowest original price of all SKUs of the product.)
│   └── maximum_amount: string (The highest original price of all SKUs of the product.)
├── category_chains: []
│   └── object (A list of categories associated with the product. Maximum length of the list is 3 categories.)
│       ├── id: string (The category identifier.)
│       ├── local_name: string (The name of the product in the category.)
│       ├── is_leaf: bool (Set to true if this category is a leaf node. Set to false if not.)
│       └── parent_id: string (The category identifier of the parent category.)
├── commission: object
│   ├── rate: int (The commission rate in hundredths of a percent. For example, 3587 is a commission rate of 35.87%. This value must a minimum of 1000. The range of this value is [100, 8000].)
│   ├── currency: string (The currency code.)
│   └── amount: string (The commission amount.)
├── sales_price: object
│   ├── currency: string (The currency code.)
│   ├── minimum_amount: string (The lowest promotion price of all SKUs of this product.)
│   └── maximum_amount: string (The highest promotion price of all SKUs of this product.)
├── next_page_token: string (An opaque token used to retrieve the next page of a paginated result set.)
└── total_count: int (Total count of products meeting the search criteria expressed in the request body.)
```

**Example**

```http
GET https://api-v1.dev.accesstrade.me/v1/tiktokshop_product_feeds?sort_field=units_sold&limit=20&title_keywords=Khăn giấy &title_keywords=Khăn ướt
```

| **Tên Header**         | **Giá trị**                                                                                                             |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **accept**             | application/json, text/plain, */*                                                                                       |
| **accept-language**    | en-US,en;q=0.6                                                                                                          |
| **authorization**      | Token {{token\_local}} *(Token của user lấy tại link)*                                                                  |
| **content-type**       | application/json                                                                                                        |
| **origin**             | <https://pub2.accesstrade.vn>                                                                                           |
| **priority**           | u=1, i                                                                                                                  |
| **referer**            | <https://pub2.accesstrade.vn/>                                                                                          |
| **sec-ch-ua**          | "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"                                                               |
| **sec-ch-ua-mobile**   | ?0                                                                                                                      |
| **sec-ch-ua-platform** | "macOS"                                                                                                                 |
| **sec-fetch-dest**     | empty                                                                                                                   |
| **sec-fetch-mode**     | cors                                                                                                                    |
| **sec-fetch-site**     | same-site                                                                                                               |
| **sec-gpc**            | 1                                                                                                                       |
| **user-agent**         | Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_15\_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 |

| **Trường**          | **Giá trị**                                                                                               |
| ------------------- | --------------------------------------------------------------------------------------------------------- |
| **sort\_field**     | HIGH\_COMMISSION\_RATE                                                                                    |
|                     | *Mặc định nếu bỏ trống sẽ là "RECOMMENDED"*                                                               |
|                     | **Các giá trị hợp lệ:**                                                                                   |
|                     | - "RECOMMENDED" – Sắp xếp theo thứ tự đề xuất của thuật toán                                              |
|                     | - "BEST\_SELLERS" – Sắp xếp theo số lượng bán trong lịch sử từ cao đến thấp                               |
|                     | - "LOW\_PRICE" – Sắp xếp theo giá từ thấp đến cao                                                         |
|                     | - "HIGH\_PRICE" – Sắp xếp theo giá từ cao đến thấp                                                        |
|                     | - "NEWLY\_RELEASED" – Sắp xếp theo thời gian ra mắt sản phẩm từ mới đến cũ                                |
|                     | - "HIGH\_COMMISSION\_RATE" – Sắp xếp theo tỷ lệ hoa hồng từ cao đến thấp                                  |
| **limit**           | 10                                                                                                        |
| **title\_keywords** | dép                                                                                                       |
| **page\_token**     | <p>b2Zmc2V0PTEw<br>\<sub>Token của trang tiếp theo được trả trong response "next\_page\_token"\</sub></p> |
| **product\_ids**    | 1730264365926091505                                                                                       |


# Lấy thông tin vouchers / coupons / deals

Lấy thông tin vouchers / coupons / deals

Lấy thông tin vouchers / coupons / deals


# Hướng dẫn lấy mã nhúng danh sách khuyến mãi lên website

Hướng dẫn lấy mã nhúng danh sách khuyến mãi lên website, landing page cá nhân.Mã khuyến mại sẽ được cập nhật tự động. Chỉ cần nhúng 1 lần.

> ## **LƯU Ý:** WP ROCKET sẽ gây lỗi khi nén file css & js, nên cần tắt plugin này để dùng được tool

## Cách lấy pubID trên hệ thống pub2 AccessTrade

**Bước 1:** Pub vào link: <https://pub2.accesstrade.vn/tool/deep_link>\
hoặc đăng nhập <https://pub2.accesstrade.vn/> => Công cụ ==> Deep Link

![Trên thanh tác vụ, tìm tới tab Công cụ, chọn menu Deep Link](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-Ml-U1YN6nS0Y0oiS8Tq%2F-Ml-iMuIzU4NLU6_b2mn%2FScreen%20Shot%202021-10-02%20at%206.17.08%20PM.png?alt=media\&token=07146723-58a4-438c-bc1c-8241233984fd)

**Bước 2:** Copy đoạn mã tương ứng với tài khoản của publisher (pub ID)\
VD: Đường dẫn cơ sở <https://go.isclix.com/deep\\_link/**0123456789**/> => copy 0123456789

![](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-Ml-U1YN6nS0Y0oiS8Tq%2F-Ml-j-eM6J5GRkROOm7G%2FScreen%20Shot%202021-10-02%20at%206.18.52%20PM.png?alt=media\&token=bde0aeb8-6be5-4358-885d-9fb00e28c5d0)

**Bước 3:** Sao chép toàn bộ đoạn mã bên dưới và thay đổi giá trị **data-accesskey** bằng pubID vừa lấy ở bước 2.

Ví dụ: pubID = 0123456789\
thì thay trong đoạn code data-accesskey="1111" thành data-accesskey="0123456789"

```markup
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=yes" /><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><meta name="HandheldFriendly" content="true" /><meta name="apple-touch-fullscreen" content="yes"/><meta name="description" content="Default Description" /><meta name="keywords" content="" /><meta name="robots" content="INDEX,FOLLOW" /><link rel="stylesheet" type="text/css" href="https://static.accesstrade.vn/coupon/v2/css/bootstrap.min.css" media="all" /><link rel="stylesheet" type="text/css" href="https://static.accesstrade.vn/coupon/v2/css/css-voucher.css" media="all" /><link rel="stylesheet" type="text/css" href="https://static.accesstrade.vn/coupon/v2/js/slick/slick.css" media="all" /><link rel="stylesheet" type="text/css" href="https://static.accesstrade.vn/coupon/v2/js/slick/slick-theme.css" media="all" /><div id="layout-wrapper"> <main class="voucher-main"><div class="container"><div class="voucher-tagsearch"><div class="search-form"> <span class="icon"><img src="https://static.accesstrade.vn/coupon/v2/images/icon-search.svg" alt=""></span> <input class="form-control" id="search" placeholder="Nhập liên kết sản phẩm cần tìm" type="text" value=""></div><ul class="tags-form list-unstyled"><li><a href="#"></a></li></ul></div><div class="voucher-mostbrand"><h4 class="title">Các nhà cung cấp nổi bật</h4><div class="listbrand-item"><div class="item-brand"> <a href=""> <img src="https://static.accesstrade.vn/coupon/v2/images/logo-brand/img-12.png" alt=""> <span></span> </a></div></div></div><div class="voucher-dealhot"><div class="title-filter"><div class="title-total"> <img src="https://static.accesstrade.vn/coupon/v2/images/icon-coupon.svg" alt=""><h2 class="title">Deal Hot</h2></div><div class="dropdown filter-sort"> <button class="dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span>Ngày</span> <i class="icon-down"><img src="https://static.accesstrade.vn/coupon/v2/images/icon-caret.svg" alt=""></i> </button><div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <a class="dropdown-item" data-date="0" href="#">Hôm nay</a> <a class="dropdown-item" data-date="1" href="#">7 ngày gần nhất</a> <a class="dropdown-item" data-date="2" href="#">30 ngày gần nhất</a></div></div></div><div class="dealitem-body"></div></div><div class="voucher-dealcoupon"><div class="title-tabs"><div class="title-total"> <img src="https://static.accesstrade.vn/coupon/v2/images/icon-promo.svg" alt=""><h2 class="title">Danh sách mã khuyến mại</h2></div><div class="title-tabslist"><ul class="nav nav-tabs" id="tabsdeal--link" role="tablist"><li class="nav-item"> <a class="nav-link active" id="history-tabs" data-toggle="tab" href="#deal-opening" role="tab">Đang mở <em></em></a></li><li class="nav-item"> <a class="nav-link" id="record-tabs" data-toggle="tab" href="#deal-soon" role="tab">Sắp mở <em></em></a></li></ul></div></div><div class="tab-content" id="tabsdeal--content"><div class="tab-pane fade show active" id="deal-opening" role="tabpanel"><div id="no-coupon-link" style="display: none;text-align: center;padding: 1em;"><h4>Link sản phẩm không có mã giảm giá</h4></div><div class="dealpromo-body"></div><div class="coupon-pagination"> <nav><ul class="pagination" name='pagination'><li class="page-item" style="display: none"> <a onclick="prev(event,1)" class="page-link" href="#" tabindex="-1"><i class="fas fa-angle-double-left"></i></a></li><li class="page-item" style="display: none"> <a onclick="prev(event)" class="page-link" href="#" tabindex="-1"><i class="fas fa-angle-left"></i></a></li><li class="page-item" style="display: none"> <a onclick="prev(event)" class="page-link" id="prev-page-active" href="#"></a></li><li class="page-item active"> <a class="page-link" href="#"><span class="sr-only"></span>1</a></li><li class="page-item" style="display: none" > <a onclick="next(event)" class="page-link" id="next-page-active" href="#"></a></li><li class="page-item" style="display: none"> <a onclick="next(event)" class="page-link" href="#" tabindex="-1"><i class="fas fa-angle-right"></i></a></li><li class="page-item" style="display: none"> <a class="page-link" href="#" tabindex="-1"><i class="fas fa-angle-double-right"></i></a></li></ul> </nav><div class="page-box"> <span class="p-0" style="display: none"> <input class="page-selected" type="text"></span> <span class="text-muted" name="text-muted">Trên trang</span></div></div></div><div class="tab-pane fade" id="deal-soon" role="tabpanel"><div id="no-coupon" style="display: none;text-align: center;padding: 1em;"><h4>Đang cập nhật</h4></div><div class="dealpromo-body"></div><div class="coupon-pagination" > <nav><ul class="pagination" name="pagination-soon"><li class="page-item" style="display: none"> <a onclick="prev(event,1,true)" class="page-link" href="#" tabindex="-1"><i class="fas fa-angle-double-left"></i></a></li><li class="page-item" style="display: none"> <a onclick="prev(event,null,true)" class="page-link" href="#" tabindex="-1"><i class="fas fa-angle-left"></i></a></li><li class="page-item" style="display: none"> <a onclick="prev(event,null,true)" class="page-link" id="prev-soon-page-active" href="#"></a></li><li class="page-item active"> <a class="page-link" href="#"><span class="sr-only"></span>1</a></li><li class="page-item" style="display: none" > <a onclick="next(event,null,true)" class="page-link" id="next-soon-page-active" href="#"></a></li><li class="page-item" style="display: none"> <a onclick="next(event,null,true)" class="page-link" href="#" tabindex="-1"><i class="fas fa-angle-right"></i></a></li><li class="page-item" style="display: none"> <a class="page-link" href="#" tabindex="-1"><i class="fas fa-angle-double-right"></i></a></li></ul> </nav><div class="page-box"> <span class="p-0" style="display: none"> <input class="page-selected" type="text"></span> <span class="text-muted" name="text-muted-soon">Trên trang</span></div></div></div></div></div></div> </main></div> <script type="text/javascript" src="https://static.accesstrade.vn/coupon/v2/js/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="https://static.accesstrade.vn/coupon/v2/js/popper.min.js"></script> <script type="text/javascript" src="https://static.accesstrade.vn/coupon/v2/js/bootstrap.min.js"></script> <script type="text/javascript" src="https://static.accesstrade.vn/coupon/v2/js/slick/slick.min.js"></script>
<script type="text/javascript" id="atScript6626" 
data-sub1="" data-sub2="" data-sub3="" data-sub4="" data-sub5="" 
data-utm-source="" data-utm-medium="" data-utm-campaign="" data-utm-content="" data-filters='{}' 
data-accesskey="4348611760548105593" 
src="https://static.accesstrade.vn/coupon/v2/js/main.js"></script>
```

{% hint style="info" %}
&#x20;Phải có data-accesskey từ AccessTrade cung cấp thì mới sử dụng được chức năng.
{% endhint %}

### Cách thay đổi tham số để tracking tùy biến

Tìm các param tương ứng danh sách bên dưới và truyền dữ liệu vào. Nên encode trước khi truyền để tránh gây lỗi cho người dùng.

| Key               | Mô tả                               |
| ----------------- | ----------------------------------- |
| data-utm-source   | Tham số để truyền vào utm\_source   |
| data-utm-medium   | Tham số để truyền vào utm\_medium   |
| data-utm-campaign | Tham số để truyền vào utm\_campaign |
| data-utm-content  | Tham số để truyền vào utm\_content  |
| data-sub1         | Tùy biến người dùng tracking        |
| data-sub2         | Tùy biến người dùng tracking        |
| data-sub3         | Tùy biến người dùng tracking        |
| data-sub4         | Tùy biến người dùng tracking        |
| data-sub5         | Tùy biến người dùng tracking        |


# \[Wordpress] Hướng dẫn nhúng vào bài post

Hướng dẫn nhúng vào bài post trên Wordpress

> ## **LƯU Ý:** WP ROCKET sẽ gây lỗi khi nén file css & js, nên cần tắt plugin này để dùng được tool

## Cài đặt Wordpress Plugin

![Vào plugins, chọn "Thêm mới" (Add New)](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-Ml9s9M4hwhjaAiGWqQC%2F-Ml9sZIB-0EJEepg_P0X%2FScreen%20Shot%202021-10-04%20at%205.26.40%20PM.png?alt=media\&token=cef43e43-31de-45ed-ac32-197e7b7cdbb2)

![Tìm kiếm plugin tên "Ad Inserter", bấm Cài Đặt (Install)](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-Ml9sgAu3W0Z51_0BtvO%2F-Ml9stgrVdqaLJycqDEu%2FScreen%20Shot%202021-10-04%20at%205.27.30%20PM.png?alt=media\&token=aea717b2-8f89-4113-80bd-875550e014c8)

![Kích hoạt (Active) plugin sau khi cài đặt xong.](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-Ml9sgAu3W0Z51_0BtvO%2F-Ml9t3qRFy2l4Fgabkj5%2FScreen%20Shot%202021-10-04%20at%205.28.24%20PM.png?alt=media\&token=dc04c1e0-7286-4267-95de-3686fb8e6893)

![Vào danh sách plugins, tìm Ad Inserter, bấm Settings (cài đặt)](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-Ml9sgAu3W0Z51_0BtvO%2F-Ml9tAKIOeM-yHHFZWz3%2FScreen%20Shot%202021-10-04%20at%205.29.11%20PM.png?alt=media\&token=7c50e546-f830-4e78-a9db-81f4ad01475a)

![Nhập code và làm theo hướng dẫn như hình.](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-Ml9sgAu3W0Z51_0BtvO%2F-Ml9tJXv_8gp2jpoa4tW%2FScreen%20Shot%202021-10-04%20at%205.30.06%20PM.png?alt=media\&token=cf547e60-416b-4a13-bef1-342fcafee372)

![Sau khi gắn thành công sẽ có kết quả như hình.](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-Ml9tWXm5x4xVZduB_c5%2F-MlA-RnTotlMdOQCKTVZ%2FScreen%20Shot%202021-09-30%20at%2011.55.39%20PM.png?alt=media\&token=dd093257-47fe-4afa-9619-175bb37cdb8f)


# \[Wordpress] Hướng dẫn tạo 1 trang riêng nhúng code

\[Wordpress] Hướng dẫn tạo 1 trang riêng nhúng code

> ## **LƯU Ý:** WP ROCKET sẽ gây lỗi khi nén file css & js, nên cần tắt plugin này để dùng được tool

## Tạo mới trang (page) bằng WP Editor

![Bấm tạo page](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-MlA-k09gtirkOCjowhd%2F-MlA0Ac_2gP9Ugdim3v_%2FScreen%20Shot%202021-10-04%20at%206.09.42%20PM.png?alt=media\&token=11a79d4f-e386-4644-8d7a-c4c58e034f6c)

![Bấm dấu cộng thêm, chọn là Custom HTML, sau đó paste code vào ô.](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-MlA-k09gtirkOCjowhd%2F-MlA0MLo7-1qw22WHqBg%2FScreen%20Shot%202021-10-04%20at%206.11.16%20PM.png?alt=media\&token=6c65b0a4-6933-487a-9914-17f26e6c3372)

![Bấm publish (lưu trang)](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-MlA-k09gtirkOCjowhd%2F-MlA0ZTHLUiIjgPjuhvB%2FScreen%20Shot%202021-10-04%20at%206.17.34%20PM.png?alt=media\&token=f32d03d0-48f3-4257-9899-cc9e4c44c754)

![Ra trang xem.](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-MlA-k09gtirkOCjowhd%2F-MlA0imIwF0ZFzv2X0mW%2FScreen%20Shot%202021-10-04%20at%206.18.24%20PM.png?alt=media\&token=e8dd4b2b-b411-4f3a-af2f-069782b62a9b)


# API - Lấy danh sách thông tin khuyến mại theo nhà cung cấp & ngành hàng.

Chọn lọc và lấy danh sách các thông tin khuyến mãi theo nhà cung cấp, ngành nghề.

## Lấy danh sách từ khóa chiến dịch hot

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/keyword_list`

This endpoint allows you to get free cakes.

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": [
    {
      "icon_text": "ShopeePay",
      "id": "shopee-181427514064896",
      "total_offer": 6
    },
    {
      "icon_text": "Mã ưu đãi",
      "id": "shopee-172130319171584",
      "total_offer": 1
    },
    {
      "icon_text": "VISA",
      "id": "shopee-74256396",
      "total_offer": 1
    }
  ],
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key          | Mô tả                                               |
| ------------ | --------------------------------------------------- |
| icon\_text   | Từ khóa                                             |
| id           | ID từ khóa, dùng trong API lấy danh sách khuyến mại |
| total\_offer | Số lượng mã khuyến mại theo từ khóa                 |

## Lấy danh sách nhà cung cấp khuyến mại

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/merchant_list`

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": [
    {
      "display_name": "Shopee",
      "id": "4742147753565840242",
      "login_name": "shopee",
      "logo": "https://content.accesstrade.vn/adv/1630740753_avatar_1630740753.gif",
      "total_offer": 7480
    },
    {
      "display_name": "tiki vn",
      "id": "4348611690224153209",
      "login_name": "tikivn",
      "logo": "https://content.accesstrade.vn/adv/1630929502_avatar_1630929502.gif",
      "total_offer": 423
    },
    {
      "display_name": "watsons",
      "id": "5701060131880384103",
      "login_name": "watsons",
      "logo": "https://content.accesstrade.vn/adv/1629711522_avatar_1629711522.png",
      "total_offer": 2
    },
    {
      "display_name": "Sendo",
      "id": "4348611682079477428",
      "login_name": "sendovn",
      "logo": "https://content.accesstrade.vn/adv/1631094599_avatar_1631094599.png",
      "total_offer": 1
    }
  ],
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key           | Mô tả                                                    |
| ------------- | -------------------------------------------------------- |
| id            | ID nhà cung cấp, dùng trong API lấy danh sách khuyến mại |
| display\_name | Tên nhà cung cấp                                         |
| login\_name   | Tên nhà cung cấp (encode)                                |
| logo          | Hình đại diện nhà cung cấp                               |
| total\_offer  | Số lượng mã khuyến mại theo nhà cung cấp                 |

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/icontext_list`

Lấy danh sách từ khóa nhóm vouchers của nhà cung cấp

#### Path Parameters

| Name                                       | Type   | Description                                   |
| ------------------------------------------ | ------ | --------------------------------------------- |
| merchant<mark style="color:red;">\*</mark> | String | ID nhà cung cấp, lấy từ API "/merchant\_list" |

{% tabs %}
{% tab title="200: OK Lấy dữ liệu thành công" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

| Key          | Mô tả                                   |
| ------------ | --------------------------------------- |
| icon\_text   | Tên từ khóa                             |
| merchant     | ID nhà cung cấp                         |
| total\_offer | Số lượng vouchers lấy được theo từ khóa |

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/coupon`

Lấy danh sách vouchers theo từ khóa nhà cung cấp

#### Path Parameters

| Name                                         | Type   | Description                            |
| -------------------------------------------- | ------ | -------------------------------------- |
| icon\_text<mark style="color:red;">\*</mark> | String | Từ khóa muốn lấy                       |
| limit                                        | int    | Giới hạn số lượng vouchers mỗi lần lấy |

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại tối đa                                                                                      |
| coin\_percentage     | Phần trăm khuyến mại tối đa                                                                                         |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |

## Lấy danh sách ngành của nhà cung cấp & mã khuyến mại

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/list_category_coupons`

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": [
    {
      "category": [
        {
          "category_name": "EC-29",
          "category_name_show": "Other",
          "category_no": ""
        }
      ],
      "count": 7903,
      "type": "E-COMMERCE"
    },
    {
      "category": [
        {
          "category_name": "BE-44",
          "category_name_show": "Beauty - Salon",
          "category_no": ""
        }
      ],
      "count": 2,
      "type": "BEAUTY"
    }
  ],
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key                         | Mô tả                        |
| --------------------------- | ---------------------------- |
| category\_name              | Mã ngành (nhóm khuyến mãi)   |
| category\_*name\_*&#x73;how | Tên ngành  (nhóm khuyến mãi) |

## Lấy danh sách mã khuyến mại

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/coupon`

#### Path Parameters

| Name                  | Type    | Description                                                                                       |
| --------------------- | ------- | ------------------------------------------------------------------------------------------------- |
| is\_next\_day\_coupon | boolean | <p>True: lấy danh sách khuyến mại sắp diễn ra<br>False: lấy danh sách khuyến mại đang diễn ra</p> |
| keyword               | string  | UID từ khóa cần chọn lọc                                                                          |
| merchant              | string  | UID mã nhà cung cấp cần chọn lọc                                                                  |
| limit                 | number  | Số bản ghi hiển thị trên 1 trang                                                                  |
| page                  | number  | Số trang kết quả                                                                                  |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "count": 7908,
    "count_current_day_coupon": 7908,
    "count_next_day_coupon": 0,
    "data": [
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-29",
            "category_name_show": "Other",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "Sử dụng mã miễn phí vận chuyển cho đơn hàng bất kì từ 0Đ thỏa điều kiện ưu đãi khi mua hàng trên Shopee:\r\n- Giảm tối đa 20K cho đơn hàng giao đến Hà Nội và Hồ Chí Minh.\r\n- Giảm tối đa 40K cho đơn hàng giao đến các tỉnh/thành phố khác.\r\nChỉ áp dụng cho đơn hàng đầu tiên của khách hàng mới.\r\nÁp dụng khi đặt hàng bằng ứng dụng Shopee.\r\nHình thức thanh toán: Tất cả.\r\nKênh vận chuyển khả dụng: Hỏa Tốc, Nhanh.\r\nMã chỉ được hoàn theo quy định của Shopee.\r\nHạn sử dụng từ 00:00 02/10/2021 - 23:58 02/10/2021.\r\nMã ưu đãi áp dụng với một số sản phẩm thuộc phạm vi chương trình. \r\nSố lượt sử dụng có hạn, chương trình và mã có thể kết thúc khi hết lượt ưu đãi hoặc khi hết hạn ưu đãi, tùy điều kiện nào đến trước.",
        "coupons": [
          {
            "coupon_code": "FSV-192996067098624",
            "coupon_desc": "Đơn hàng đầu tiên"
          }
        ],
        "ctime": "Sat, 02 Oct 2021 00:21:04 GMT",
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": "Sat, 02 Oct 2021 23:58:00 GMT",
        "id": "shopee-192996067098624",
        "image": "https://content.accesstrade.vn/adv/1630740753_avatar_1630740753.gif",
        "is_hot": "False",
        "link": "https://shopee.vn/search?promotionId=192996067098624&signature=724443419ba6abaca74a7ded5fa99ddf837f858b26421c4ab39f4bc6b18d3d40&voucherCode=FSV-192996067098624&ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "[SHOPEE]-Đơn hàng đầu tiên",
        "percentage_used": 31,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/search?promotionId=192996067098624&signature=724443419ba6abaca74a7ded5fa99ddf837f858b26421c4ab39f4bc6b18d3d40&voucherCode=FSV-192996067098624&ref=sansandeals",
        "register": 1,
        "shop_id": null,
        "start_date": "Sat, 02 Oct 2021 00:00:00 GMT",
        "status": 1,
        "time_left": "Còn lại 0 ngày 7 giờ 46 phút"
      }
    ]
  },
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại tối đa                                                                                      |
| coin\_percentage     | Phần trăm khuyến mại tối đa                                                                                         |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |

## Lấy danh sách mã khuyến mại ưu tiên

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/coupon_hot`

#### Path Parameters

| Name  | Type   | Description                                               |
| ----- | ------ | --------------------------------------------------------- |
| limit | number | Số bản ghi giới hạn trên 1 trang                          |
| date  | number | <p>1 lấy khuyến mại hot theo tuần<br>2 lấy theo tháng</p> |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "count": 1,
    "data": [
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-1",
            "category_name_show": "Điện thoại - Máy tính bảng",
            "category_no": ""
          },
          {
            "category_name": "EC-2",
            "category_name_show": "Tivi-âm thanh",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "VOUCHER GIẢM 20K DÀNH CHO KHÁCH HÀNG MỚI\nMã: NAFNEWBUYT9\n- Giảm tối đa 20K cho đơn hàng từ 50K trên app Shopee\n- Thời hạn áp dụng: đến 30/09/2021, 23H59\n- Lưu ý:\nSố lượng có hạn\nMỗi khách hàng chỉ sử dụng 1 lần\nChỉ áp dụng cho Khách hàng mới",
        "coupons": [
          {
            "coupon_code": "NAFNEWBUYT9",
            "coupon_desc": "VOUCHER GIẢM 20K DÀNH CHO KHÁCH HÀNG MỚI",
            "coupon_save": "20000",
            "coupon_type": 5
          }
        ],
        "ctime": {
          "$date": 1632996182570
        },
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": {
          "$date": 1633305600000
        },
        "id": "5756834766452765293",
        "image": "https://static.accesstrade.vn/adv/img/deal_coupons-30-09-2021-bvp0so.png",
        "is_hot": "True",
        "link": "https://shopee.vn/m/don-dau-tien-mien-phi?ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "SHOPEE - VOUCHER GIẢM 20K DÀNH CHO KHÁCH HÀNG MỚI",
        "percentage_used": 100,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/m/don-dau-tien-mien-phi?ref=sansandeals",
        "register": 1,
        "shop_id": 0,
        "start_date": {
          "$date": 1632960000000
        },
        "status": 1,
        "time_left": "Còn lại 1 ngày 7 giờ 48 phút"
      }
    ]
  },
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại                                                                                             |
| coin\_percentage     | Phần trăm khuyến mại                                                                                                |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |

## Tìm kiếm mã khuyến mại theo link (Shopee & TIKI)

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/coupon`

#### Path Parameters

| Name                                  | Type   | Description                                                           |
| ------------------------------------- | ------ | --------------------------------------------------------------------- |
| URL<mark style="color:red;">\*</mark> | string | Đường dẫn sản phẩm để tìm kiếm mã khuyến mãi (có thể dùng short link) |

{% tabs %}
{% tab title="200 Gọi thành công và trả về danh sách mã" %}

```
{
  "data": {
    "count": 29,
    "count_current_day_coupon": 29,
    "count_next_day_coupon": 0,
    "data": [
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-29",
            "category_name_show": "Other",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "La Roche-Posay Chính Hãng",
        "coupons": [
          {
            "coupon_code": "LAROPH120",
            "coupon_desc": "Giảm 120,000 VNĐ cho đơn tối thiểu 1,000,000 VNĐ"
          }
        ],
        "ctime": "Sat, 02 Oct 2021 17:04:21 GMT",
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": "Sat, 02 Oct 2021 23:59:00 GMT",
        "id": "shopee-198385957076992",
        "image": "https://cf.shopee.vn/file/1be3baed98088f45bc368f1cb2a0e721",
        "is_hot": "False",
        "link": "https://shopee.vn/search?promotionId=198385957076992&signature=832e13655c20079f01701bd1efa734dee9584a87f2f069112b7107656f1b1496&voucherCode=LAROPH120&ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "[La Roche-Posay Chính Hãng]-Giảm 120,000 VNĐ cho đơn tối thiểu 1,000,000 VNĐ",
        "percentage_used": 27,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/search?promotionId=198385957076992&signature=832e13655c20079f01701bd1efa734dee9584a87f2f069112b7107656f1b1496&voucherCode=LAROPH120&ref=sansandeals",
        "register": 1,
        "shop_id": 37251700,
        "start_date": "Sat, 02 Oct 2021 00:18:00 GMT",
        "status": 1,
        "time_left": "Còn lại 0 ngày 6 giờ 55 phút"
      },
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-29",
            "category_name_show": "Other",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "La Roche-Posay Chính Hãng",
        "coupons": [
          {
            "coupon_code": "LAROPH85",
            "coupon_desc": "Giảm 85,000 VNĐ cho đơn tối thiểu 850,000 VNĐ"
          }
        ],
        "ctime": "Sat, 02 Oct 2021 17:04:21 GMT",
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": "Sat, 02 Oct 2021 23:59:00 GMT",
        "id": "shopee-198385084743680",
        "image": "https://cf.shopee.vn/file/1be3baed98088f45bc368f1cb2a0e721",
        "is_hot": "False",
        "link": "https://shopee.vn/search?promotionId=198385084743680&signature=ebbcec4bf0844fcdc49953c6b933d5e42aac1b1fe620d0c3aa7e740c3f67ef0c&voucherCode=LAROPH85&ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "[La Roche-Posay Chính Hãng]-Giảm 85,000 VNĐ cho đơn tối thiểu 850,000 VNĐ",
        "percentage_used": 88,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/search?promotionId=198385084743680&signature=ebbcec4bf0844fcdc49953c6b933d5e42aac1b1fe620d0c3aa7e740c3f67ef0c&voucherCode=LAROPH85&ref=sansandeals",
        "register": 1,
        "shop_id": 37251700,
        "start_date": "Sat, 02 Oct 2021 00:15:00 GMT",
        "status": 1,
        "time_left": "Còn lại 0 ngày 6 giờ 55 phút"
      },
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-29",
            "category_name_show": "Other",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "Sử dụng mã miễn phí vận chuyển cho đơn hàng bất kì từ 0Đ thỏa điều kiện ưu đãi khi mua hàng trên Shopee:\r\n- Giảm tối đa 20K cho đơn hàng giao đến Hà Nội và Hồ Chí Minh.\r\n- Giảm tối đa 40K cho đơn hàng giao đến các tỉnh/thành phố khác.\r\nChỉ áp dụng cho đơn hàng đầu tiên của khách hàng mới.\r\nÁp dụng khi đặt hàng bằng ứng dụng Shopee.\r\nHình thức thanh toán: Tất cả.\r\nKênh vận chuyển khả dụng: Hỏa Tốc, Nhanh.\r\nMã chỉ được hoàn theo quy định của Shopee.\r\nHạn sử dụng từ 00:00 02/10/2021 - 23:58 02/10/2021.\r\nMã ưu đãi áp dụng với một số sản phẩm thuộc phạm vi chương trình. \r\nSố lượt sử dụng có hạn, chương trình và mã có thể kết thúc khi hết lượt ưu đãi hoặc khi hết hạn ưu đãi, tùy điều kiện nào đến trước.",
        "coupons": [
          {
            "coupon_code": "FSV-192996067098624",
            "coupon_desc": "Đơn hàng đầu tiên"
          }
        ],
        "ctime": "Sat, 02 Oct 2021 00:21:04 GMT",
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": "Sat, 02 Oct 2021 23:58:00 GMT",
        "id": "shopee-192996067098624",
        "image": "https://content.accesstrade.vn/adv/1630740753_avatar_1630740753.gif",
        "is_hot": "False",
        "link": "https://shopee.vn/search?promotionId=192996067098624&signature=724443419ba6abaca74a7ded5fa99ddf837f858b26421c4ab39f4bc6b18d3d40&voucherCode=FSV-192996067098624&ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "[SHOPEE]-Đơn hàng đầu tiên",
        "percentage_used": 30,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/search?promotionId=192996067098624&signature=724443419ba6abaca74a7ded5fa99ddf837f858b26421c4ab39f4bc6b18d3d40&voucherCode=FSV-192996067098624&ref=sansandeals",
        "register": 1,
        "shop_id": null,
        "start_date": "Sat, 02 Oct 2021 00:00:00 GMT",
        "status": 1,
        "time_left": "Còn lại 0 ngày 6 giờ 54 phút"
      }
    ]
  },
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại                                                                                             |
| coin\_percentage     | Phần trăm khuyến mại                                                                                                |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |


# Copy of API - Lấy danh sách thông tin khuyến mại theo nhà cung cấp & ngành hàng.

Chọn lọc và lấy danh sách các thông tin khuyến mãi theo nhà cung cấp, ngành nghề.

## Lấy danh sách từ khóa chiến dịch hot

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/keyword_list`

This endpoint allows you to get free cakes.

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": [
    {
      "icon_text": "ShopeePay",
      "id": "shopee-181427514064896",
      "total_offer": 6
    },
    {
      "icon_text": "Mã ưu đãi",
      "id": "shopee-172130319171584",
      "total_offer": 1
    },
    {
      "icon_text": "VISA",
      "id": "shopee-74256396",
      "total_offer": 1
    }
  ],
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key          | Mô tả                                               |
| ------------ | --------------------------------------------------- |
| icon\_text   | Từ khóa                                             |
| id           | ID từ khóa, dùng trong API lấy danh sách khuyến mại |
| total\_offer | Số lượng mã khuyến mại theo từ khóa                 |

## Lấy danh sách nhà cung cấp khuyến mại

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/merchant_list`

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": [
    {
      "display_name": "Shopee",
      "id": "4742147753565840242",
      "login_name": "shopee",
      "logo": "https://content.accesstrade.vn/adv/1630740753_avatar_1630740753.gif",
      "total_offer": 7480
    },
    {
      "display_name": "tiki vn",
      "id": "4348611690224153209",
      "login_name": "tikivn",
      "logo": "https://content.accesstrade.vn/adv/1630929502_avatar_1630929502.gif",
      "total_offer": 423
    },
    {
      "display_name": "watsons",
      "id": "5701060131880384103",
      "login_name": "watsons",
      "logo": "https://content.accesstrade.vn/adv/1629711522_avatar_1629711522.png",
      "total_offer": 2
    },
    {
      "display_name": "Sendo",
      "id": "4348611682079477428",
      "login_name": "sendovn",
      "logo": "https://content.accesstrade.vn/adv/1631094599_avatar_1631094599.png",
      "total_offer": 1
    }
  ],
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key           | Mô tả                                                    |
| ------------- | -------------------------------------------------------- |
| id            | ID nhà cung cấp, dùng trong API lấy danh sách khuyến mại |
| display\_name | Tên nhà cung cấp                                         |
| login\_name   | Tên nhà cung cấp (encode)                                |
| logo          | Hình đại diện nhà cung cấp                               |
| total\_offer  | Số lượng mã khuyến mại theo nhà cung cấp                 |

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/icontext_list`

Lấy danh sách từ khóa nhóm vouchers của nhà cung cấp

#### Path Parameters

| Name                                       | Type   | Description                                   |
| ------------------------------------------ | ------ | --------------------------------------------- |
| merchant<mark style="color:red;">\*</mark> | String | ID nhà cung cấp, lấy từ API "/merchant\_list" |

{% tabs %}
{% tab title="200: OK Lấy dữ liệu thành công" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

| Key          | Mô tả                                   |
| ------------ | --------------------------------------- |
| icon\_text   | Tên từ khóa                             |
| merchant     | ID nhà cung cấp                         |
| total\_offer | Số lượng vouchers lấy được theo từ khóa |

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/coupon`

Lấy danh sách vouchers theo từ khóa nhà cung cấp

#### Path Parameters

| Name                                         | Type   | Description                            |
| -------------------------------------------- | ------ | -------------------------------------- |
| icon\_text<mark style="color:red;">\*</mark> | String | Từ khóa muốn lấy                       |
| limit                                        | int    | Giới hạn số lượng vouchers mỗi lần lấy |

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại tối đa                                                                                      |
| coin\_percentage     | Phần trăm khuyến mại tối đa                                                                                         |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |

## Lấy danh sách ngành của nhà cung cấp & mã khuyến mại

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/list_category_coupons`

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": [
    {
      "category": [
        {
          "category_name": "EC-29",
          "category_name_show": "Other",
          "category_no": ""
        }
      ],
      "count": 7903,
      "type": "E-COMMERCE"
    },
    {
      "category": [
        {
          "category_name": "BE-44",
          "category_name_show": "Beauty - Salon",
          "category_no": ""
        }
      ],
      "count": 2,
      "type": "BEAUTY"
    }
  ],
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key                         | Mô tả                        |
| --------------------------- | ---------------------------- |
| category\_name              | Mã ngành (nhóm khuyến mãi)   |
| category\_*name\_*&#x73;how | Tên ngành  (nhóm khuyến mãi) |

## Lấy danh sách mã khuyến mại

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/coupon`

#### Path Parameters

| Name                  | Type    | Description                                                                                       |
| --------------------- | ------- | ------------------------------------------------------------------------------------------------- |
| is\_next\_day\_coupon | boolean | <p>True: lấy danh sách khuyến mại sắp diễn ra<br>False: lấy danh sách khuyến mại đang diễn ra</p> |
| keyword               | string  | UID từ khóa cần chọn lọc                                                                          |
| merchant              | string  | UID mã nhà cung cấp cần chọn lọc                                                                  |
| limit                 | number  | Số bản ghi hiển thị trên 1 trang                                                                  |
| page                  | number  | Số trang kết quả                                                                                  |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "count": 7908,
    "count_current_day_coupon": 7908,
    "count_next_day_coupon": 0,
    "data": [
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-29",
            "category_name_show": "Other",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "Sử dụng mã miễn phí vận chuyển cho đơn hàng bất kì từ 0Đ thỏa điều kiện ưu đãi khi mua hàng trên Shopee:\r\n- Giảm tối đa 20K cho đơn hàng giao đến Hà Nội và Hồ Chí Minh.\r\n- Giảm tối đa 40K cho đơn hàng giao đến các tỉnh/thành phố khác.\r\nChỉ áp dụng cho đơn hàng đầu tiên của khách hàng mới.\r\nÁp dụng khi đặt hàng bằng ứng dụng Shopee.\r\nHình thức thanh toán: Tất cả.\r\nKênh vận chuyển khả dụng: Hỏa Tốc, Nhanh.\r\nMã chỉ được hoàn theo quy định của Shopee.\r\nHạn sử dụng từ 00:00 02/10/2021 - 23:58 02/10/2021.\r\nMã ưu đãi áp dụng với một số sản phẩm thuộc phạm vi chương trình. \r\nSố lượt sử dụng có hạn, chương trình và mã có thể kết thúc khi hết lượt ưu đãi hoặc khi hết hạn ưu đãi, tùy điều kiện nào đến trước.",
        "coupons": [
          {
            "coupon_code": "FSV-192996067098624",
            "coupon_desc": "Đơn hàng đầu tiên"
          }
        ],
        "ctime": "Sat, 02 Oct 2021 00:21:04 GMT",
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": "Sat, 02 Oct 2021 23:58:00 GMT",
        "id": "shopee-192996067098624",
        "image": "https://content.accesstrade.vn/adv/1630740753_avatar_1630740753.gif",
        "is_hot": "False",
        "link": "https://shopee.vn/search?promotionId=192996067098624&signature=724443419ba6abaca74a7ded5fa99ddf837f858b26421c4ab39f4bc6b18d3d40&voucherCode=FSV-192996067098624&ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "[SHOPEE]-Đơn hàng đầu tiên",
        "percentage_used": 31,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/search?promotionId=192996067098624&signature=724443419ba6abaca74a7ded5fa99ddf837f858b26421c4ab39f4bc6b18d3d40&voucherCode=FSV-192996067098624&ref=sansandeals",
        "register": 1,
        "shop_id": null,
        "start_date": "Sat, 02 Oct 2021 00:00:00 GMT",
        "status": 1,
        "time_left": "Còn lại 0 ngày 7 giờ 46 phút"
      }
    ]
  },
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại tối đa                                                                                      |
| coin\_percentage     | Phần trăm khuyến mại tối đa                                                                                         |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |

## Lấy danh sách mã khuyến mại ưu tiên

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/coupon_hot`

#### Path Parameters

| Name  | Type   | Description                                               |
| ----- | ------ | --------------------------------------------------------- |
| limit | number | Số bản ghi giới hạn trên 1 trang                          |
| date  | number | <p>1 lấy khuyến mại hot theo tuần<br>2 lấy theo tháng</p> |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "count": 1,
    "data": [
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-1",
            "category_name_show": "Điện thoại - Máy tính bảng",
            "category_no": ""
          },
          {
            "category_name": "EC-2",
            "category_name_show": "Tivi-âm thanh",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "VOUCHER GIẢM 20K DÀNH CHO KHÁCH HÀNG MỚI\nMã: NAFNEWBUYT9\n- Giảm tối đa 20K cho đơn hàng từ 50K trên app Shopee\n- Thời hạn áp dụng: đến 30/09/2021, 23H59\n- Lưu ý:\nSố lượng có hạn\nMỗi khách hàng chỉ sử dụng 1 lần\nChỉ áp dụng cho Khách hàng mới",
        "coupons": [
          {
            "coupon_code": "NAFNEWBUYT9",
            "coupon_desc": "VOUCHER GIẢM 20K DÀNH CHO KHÁCH HÀNG MỚI",
            "coupon_save": "20000",
            "coupon_type": 5
          }
        ],
        "ctime": {
          "$date": 1632996182570
        },
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": {
          "$date": 1633305600000
        },
        "id": "5756834766452765293",
        "image": "https://static.accesstrade.vn/adv/img/deal_coupons-30-09-2021-bvp0so.png",
        "is_hot": "True",
        "link": "https://shopee.vn/m/don-dau-tien-mien-phi?ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "SHOPEE - VOUCHER GIẢM 20K DÀNH CHO KHÁCH HÀNG MỚI",
        "percentage_used": 100,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/m/don-dau-tien-mien-phi?ref=sansandeals",
        "register": 1,
        "shop_id": 0,
        "start_date": {
          "$date": 1632960000000
        },
        "status": 1,
        "time_left": "Còn lại 1 ngày 7 giờ 48 phút"
      }
    ]
  },
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại                                                                                             |
| coin\_percentage     | Phần trăm khuyến mại                                                                                                |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |

## Tìm kiếm mã khuyến mại theo link (Shopee & TIKI)

<mark style="color:blue;">`GET`</mark> `https://api.accesstrade.vn/v1/offers_informations/coupon`

#### Path Parameters

| Name                                  | Type   | Description                                                           |
| ------------------------------------- | ------ | --------------------------------------------------------------------- |
| URL<mark style="color:red;">\*</mark> | string | Đường dẫn sản phẩm để tìm kiếm mã khuyến mãi (có thể dùng short link) |

{% tabs %}
{% tab title="200 Gọi thành công và trả về danh sách mã" %}

```
{
  "data": {
    "count": 29,
    "count_current_day_coupon": 29,
    "count_next_day_coupon": 0,
    "data": [
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-29",
            "category_name_show": "Other",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "La Roche-Posay Chính Hãng",
        "coupons": [
          {
            "coupon_code": "LAROPH120",
            "coupon_desc": "Giảm 120,000 VNĐ cho đơn tối thiểu 1,000,000 VNĐ"
          }
        ],
        "ctime": "Sat, 02 Oct 2021 17:04:21 GMT",
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": "Sat, 02 Oct 2021 23:59:00 GMT",
        "id": "shopee-198385957076992",
        "image": "https://cf.shopee.vn/file/1be3baed98088f45bc368f1cb2a0e721",
        "is_hot": "False",
        "link": "https://shopee.vn/search?promotionId=198385957076992&signature=832e13655c20079f01701bd1efa734dee9584a87f2f069112b7107656f1b1496&voucherCode=LAROPH120&ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "[La Roche-Posay Chính Hãng]-Giảm 120,000 VNĐ cho đơn tối thiểu 1,000,000 VNĐ",
        "percentage_used": 27,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/search?promotionId=198385957076992&signature=832e13655c20079f01701bd1efa734dee9584a87f2f069112b7107656f1b1496&voucherCode=LAROPH120&ref=sansandeals",
        "register": 1,
        "shop_id": 37251700,
        "start_date": "Sat, 02 Oct 2021 00:18:00 GMT",
        "status": 1,
        "time_left": "Còn lại 0 ngày 6 giờ 55 phút"
      },
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-29",
            "category_name_show": "Other",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "La Roche-Posay Chính Hãng",
        "coupons": [
          {
            "coupon_code": "LAROPH85",
            "coupon_desc": "Giảm 85,000 VNĐ cho đơn tối thiểu 850,000 VNĐ"
          }
        ],
        "ctime": "Sat, 02 Oct 2021 17:04:21 GMT",
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": "Sat, 02 Oct 2021 23:59:00 GMT",
        "id": "shopee-198385084743680",
        "image": "https://cf.shopee.vn/file/1be3baed98088f45bc368f1cb2a0e721",
        "is_hot": "False",
        "link": "https://shopee.vn/search?promotionId=198385084743680&signature=ebbcec4bf0844fcdc49953c6b933d5e42aac1b1fe620d0c3aa7e740c3f67ef0c&voucherCode=LAROPH85&ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "[La Roche-Posay Chính Hãng]-Giảm 85,000 VNĐ cho đơn tối thiểu 850,000 VNĐ",
        "percentage_used": 88,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/search?promotionId=198385084743680&signature=ebbcec4bf0844fcdc49953c6b933d5e42aac1b1fe620d0c3aa7e740c3f67ef0c&voucherCode=LAROPH85&ref=sansandeals",
        "register": 1,
        "shop_id": 37251700,
        "start_date": "Sat, 02 Oct 2021 00:15:00 GMT",
        "status": 1,
        "time_left": "Còn lại 0 ngày 6 giờ 55 phút"
      },
      {
        "banner": [],
        "campaign": "322",
        "campaign_id": "4751584435713464237",
        "campaign_name": "Shopee Việt Nam Smartlink cho tất cả thiết bị",
        "categories": [
          {
            "category_name": "EC-29",
            "category_name_show": "Other",
            "category_no": ""
          }
        ],
        "coin_cap": 0,
        "coin_percentage": 0,
        "content": "Sử dụng mã miễn phí vận chuyển cho đơn hàng bất kì từ 0Đ thỏa điều kiện ưu đãi khi mua hàng trên Shopee:\r\n- Giảm tối đa 20K cho đơn hàng giao đến Hà Nội và Hồ Chí Minh.\r\n- Giảm tối đa 40K cho đơn hàng giao đến các tỉnh/thành phố khác.\r\nChỉ áp dụng cho đơn hàng đầu tiên của khách hàng mới.\r\nÁp dụng khi đặt hàng bằng ứng dụng Shopee.\r\nHình thức thanh toán: Tất cả.\r\nKênh vận chuyển khả dụng: Hỏa Tốc, Nhanh.\r\nMã chỉ được hoàn theo quy định của Shopee.\r\nHạn sử dụng từ 00:00 02/10/2021 - 23:58 02/10/2021.\r\nMã ưu đãi áp dụng với một số sản phẩm thuộc phạm vi chương trình. \r\nSố lượt sử dụng có hạn, chương trình và mã có thể kết thúc khi hết lượt ưu đãi hoặc khi hết hạn ưu đãi, tùy điều kiện nào đến trước.",
        "coupons": [
          {
            "coupon_code": "FSV-192996067098624",
            "coupon_desc": "Đơn hàng đầu tiên"
          }
        ],
        "ctime": "Sat, 02 Oct 2021 00:21:04 GMT",
        "discount_percentage": 0,
        "discount_value": 0,
        "end_date": "Sat, 02 Oct 2021 23:58:00 GMT",
        "id": "shopee-192996067098624",
        "image": "https://content.accesstrade.vn/adv/1630740753_avatar_1630740753.gif",
        "is_hot": "False",
        "link": "https://shopee.vn/search?promotionId=192996067098624&signature=724443419ba6abaca74a7ded5fa99ddf837f858b26421c4ab39f4bc6b18d3d40&voucherCode=FSV-192996067098624&ref=sansandeals",
        "max_value": 0,
        "merchant": "shopee",
        "min_spend": 0,
        "name": "[SHOPEE]-Đơn hàng đầu tiên",
        "percentage_used": 30,
        "prod_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https://shopee.vn/search?promotionId=192996067098624&signature=724443419ba6abaca74a7ded5fa99ddf837f858b26421c4ab39f4bc6b18d3d40&voucherCode=FSV-192996067098624&ref=sansandeals",
        "register": 1,
        "shop_id": null,
        "start_date": "Sat, 02 Oct 2021 00:00:00 GMT",
        "status": 1,
        "time_left": "Còn lại 0 ngày 6 giờ 54 phút"
      }
    ]
  },
  "success": true
}
```

{% endtab %}
{% endtabs %}

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại                                                                                             |
| coin\_percentage     | Phần trăm khuyến mại                                                                                                |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |

## Tìm kiếm mã khuyến mại theo nhiều link (Shopee & TIKI)

<mark style="color:green;">`POST`</mark> `https://api.accesstrade.vn/v1/offers_informations/multi_link_2_coupons`

#### Query Parameters

| Name                                   | Type   | Description                                                                                                                                                                                                          |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URLS<mark style="color:red;">\*</mark> | String | <p>Đường dẫn sản phẩm để tìm kiếm mã khuyến mãi (có thể dùng short link)</p><p></p><p>URLS: params được gửi theo format url1,url2,url3,..url5. Đang giới hạn 5 url 1 request và 30 request trong 1 phút cho api.</p> |

{% tabs %}
{% tab title="200: OK Gọi thành công và trả về danh sách mã" %}

```javascript
"data": [
        {
            "list_voucher": [
                {
                    "aff_link": "https://go.isclix.com/deep_link/4348611760548105593/4751584435713464237?url=https%3A%2F%2Fshopee.vn%2Fsearch%3FpromotionId%3D220397094109184%26signature%3D2b19635bb6f9013d8a33a47c0ace9eab9ac610b1b3d0b5d0849a86c33e8181b7%26voucherCode%3DSHAN65498%26ref%3Dsansandeals",
                    "campaign_id": "4751584435713464237",
                    "content": "shanmieleng.vn",
                    "coupons": [
                        {
                            "coupon_code": "SHAN65498",
                            "coupon_desc": "Giảm 5,000 VNĐ cho đơn tối thiểu 15,000 VNĐ"
                        }
                    ],
                    "end_time": "2021/12/31",
                    "id": "shopee-220397094109184",
                    "image": "https://cf.shopee.vn/file/e33a442535b74c693c14356cb8cece57",
                    "link": "https://shopee.vn/search?promotionId=220397094109184&signature=2b19635bb6f9013d8a33a47c0ace9eab9ac610b1b3d0b5d0849a86c33e8181b7&voucherCode=SHAN65498&ref=sansandeals",
                    "merchant": "shopee",
                    "name": "[shanmieleng.vn]-Giảm 5,000 VNĐ cho đơn tối thiểu 15,000 VNĐ",
                    "remain": 94,
                    "remain_true": true,
                    "start_time": "2021/11/01 09:19",
                    "time_left": "Còn 21 ngày 22:13"
                },
                {
                    "aff_link": "https://go.isclix.com/deep_link/4348611760548105593/4751584435713464237?url=https%3A%2F%2Fshopee.vn%2Fsearch%3FpromotionId%3D220397286998016%26signature%3Db157427c39d3dd4b1a972bef1166416fbbb1ae8e67cc07520520f2380de1b513%26voucherCode%3DSHAN65652%26ref%3Dsansandeals",
                    "campaign_id": "4751584435713464237",
                    "content": "shanmieleng.vn",
                    "coupons": [
                        {
                            "coupon_code": "SHAN65652",
                            "coupon_desc": "Giảm 10,000 VNĐ cho đơn tối thiểu 200,000 VNĐ"
                        }
                    ],
                    "end_time": "2021/12/31",
                    "id": "shopee-220397286998016",
                    "image": "https://cf.shopee.vn/file/e33a442535b74c693c14356cb8cece57",
                    "link": "https://shopee.vn/search?promotionId=220397286998016&signature=b157427c39d3dd4b1a972bef1166416fbbb1ae8e67cc07520520f2380de1b513&voucherCode=SHAN65652&ref=sansandeals",
                    "merchant": "shopee",
                    "name": "[shanmieleng.vn]-Giảm 10,000 VNĐ cho đơn tối thiểu 200,000 VNĐ",
                    "remain": 84,
                    "remain_true": true,
                    "start_time": "2021/11/01 09:19",
                    "time_left": "Còn 21 ngày 22:13"
                },
                {
                    "aff_link": "https://go.isclix.com/deep_link/4348611760548105593/4751584435713464237?url=https%3A%2F%2Fshopee.vn%2Fsearch%3FpromotionId%3D220397454835712%26signature%3D37e03b3f4d021b047df8516326b5bdf2964b951c8bbef59ee19bfdb01ade21f6%26voucherCode%3DSHAN66652%26ref%3Dsansandeals",
                    "campaign_id": "4751584435713464237",
                    "content": "shanmieleng.vn",
                    "coupons": [
                        {
                            "coupon_code": "SHAN66652",
                            "coupon_desc": "Giảm 20,000 VNĐ cho đơn tối thiểu 300,000 VNĐ"
                        }
                    ],
                    "end_time": "2021/12/31",
                    "id": "shopee-220397454835712",
                    "image": "https://cf.shopee.vn/file/e33a442535b74c693c14356cb8cece57",
                    "link": "https://shopee.vn/search?promotionId=220397454835712&signature=37e03b3f4d021b047df8516326b5bdf2964b951c8bbef59ee19bfdb01ade21f6&voucherCode=SHAN66652&ref=sansandeals",
                    "merchant": "shopee",
                    "name": "[shanmieleng.vn]-Giảm 20,000 VNĐ cho đơn tối thiểu 300,000 VNĐ",
                    "remain": 77,
                    "remain_true": true,
                    "start_time": "2021/11/01 09:20",
                    "time_left": "Còn 21 ngày 22:14"
                }
            ],
            "origin_url": "https://go.isclix.com/deep_link/5675163798260267617/5250371113292977031?utm_source=tiktok&utm_content=koc&ref=koc-ldp&sub4=koclanding&sub5=landingpage_178&sub3=158096&url=https%3A%2F%2Fshopee.vn%2Fproduct%2F484431289%2F13902884325%3Freferer%3Dat-kol-new",
            "status": true
        }
    ],
    "message": "Success",
    "status": true
}
```

{% endtab %}

{% tab title="204: No Content Truyền link không có campaign liên kết" %}

```javascript
{
            "message": "This hostname www.thegioididong.com doesn't affiliate with any campaign",
            "origin_url": "https://shorten.asia/Ya43g5WR",
            "status": false
        },
```

{% endtab %}

{% tab title="204: No Content Link product link ko có voucher " %}

```javascript
{
            "list_voucher": [],
            "origin_url": "https://go.isclix.com/deep_link/5675163798260267617/5250371113292977031?utm_source=tiktok&utm_content=koc&ref=koc-ldp&sub4=koclanding&sub5=landingpage_178&sub3=160953&url=https://shopee.vn/product/316142335/10870488006?referer=at-kol-new",
            "status": true
        }
```

{% endtab %}
{% endtabs %}

| Key                  | Mô tả                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------- |
| banners              | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content              | Mô tả khuyến mại                                                                                                    |
| id                   | id khuyến mại                                                                                                       |
| image                | url ảnh đại diện khuyến mại                                                                                         |
| link                 | url khuyến mại                                                                                                      |
| merchant             | nhà cung cấp mã khuyến mại                                                                                          |
| categories           | danh sách category của khuyến mại                                                                                   |
| name                 | Tên khuyến mại                                                                                                      |
| start\_time          | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time            | Thời gian kết thúc khuyến mại                                                                                       |
| domain               | Domain sản phẩm khuyến mại                                                                                          |
| prod\_link           | Affiliate link                                                                                                      |
| coupons              | Chi tiết mã khuyến mại                                                                                              |
| coin\_cap            | Số tiền được khuyến mại                                                                                             |
| coin\_percentage     | Phần trăm khuyến mại                                                                                                |
| percentage\_used     | Phần trăm số lượng khuyến mại đã sử dụng                                                                            |
| discount\_value      | Giá trị được giảm                                                                                                   |
| discount\_percentage | Phần trăm được giảm                                                                                                 |


# Lấy thông tin các khuyến mại đang hoạt động

> Vui lòng chuyển sang dùng phiên bản mới tại [LINK](https://developers.accesstrade.vn/api-publisher-vietnamese/lay-thong-tin-cac-khuyen-mai-dang-hoat-dong/huong-dan-lay-ma-nhung-danh-sach-khuyen-mai-len-website).

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/offers_informations
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

Các biến params được truyền vào HTTP Request theo các cặp Key-Value, mở đầu chuỗi params bằng dấu “?” và giữa các biến phân tách nhau bằng dấu “&”. Vd:&#x20;

```
https://api.accesstrade.vn/v1/offers_informations?merchant=bambooairways
```

| Biến params | Required | Mô tả                                                                                                                                         |
| ----------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| scope       | tùy chọn | Truyền value cho tham số này là “expiring” để get các khuyến mại sắp hết hạn. Lấy tất cả nếu không truyền hoặc truyền sai value.              |
| merchant    | tùy chọn | Tên owner của khuyến mại. vd: lazada                                                                                                          |
| categories  | tùy chọn | category\_name của khuyến mại. Ex: voucher-dich-vu. Có thể truyền nhiều category, phân cách nhau bằng dấu phẩy ","                            |
| domain      | tùy chọn | Domain của khuyến mại. vd: lazada.vn                                                                                                          |
| coupon      | tùy chọn | Truyền value là 1 để get khuyến mại có mã giảm giá, 0 để get khuyến mại không có mã giảm giá. Mặc định lấy tất cả.                            |
| status      | tùy chọn | Truyền value 1 để lấy thông tin các offers còn hoạt động, value 0 để lấy thông tin các offers hết hạn, và không truyền key này để lấy tất cả. |
| limit       | tùy chọn | số bản ghi hiển thị trên một trang                                                                                                            |
| page        | tùy chọn | số trang show kết quả                                                                                                                         |

#### Mô tả kết quả <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Key         | Mô tả                                                                                                               |
| ----------- | ------------------------------------------------------------------------------------------------------------------- |
| banners     | là 1 list chứa các dict banner, trong mỗi dict có: “link” - url banner, “width” - chiều rộng, “height” - chiều cao. |
| content     | Mô tả khuyến mại                                                                                                    |
| id          | id khuyến mại                                                                                                       |
| image       | url ảnh đại diện khuyến mại                                                                                         |
| link        | url khuyến mại                                                                                                      |
| merchant    | owner khuyến mại                                                                                                    |
| categories  | danh sách category của khuyến mại                                                                                   |
| name        | Tên khuyến mại                                                                                                      |
| start\_time | Thời gian bắt đầu khuyến mại                                                                                        |
| end\_time   | Thời gian kết thúc khuyến mại                                                                                       |
| domain      | Domain sản phẩm khuyến mại                                                                                          |
| aff\_link   | Affiliate link                                                                                                      |

> API response trả về

```
{
    "data": [
        {
            "aff_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https%3A%2F%2Fwww.bambooairways.com%2Fvn-vi%2Fthong-tin-dat-ve%2Fuu-dai%2Fmung-ngay-giai-phong-uu-dai-cuc-nong%2F",
            "banners": [],
            "categories": [],
            "content": "⭐Giá sản phẩm: đồng giá 10,000 VNĐ (base fare (giá cơ sở), chưa bao gồm thuế phí)\n⭐Hạng giá vé áp dụng: Bamboo Eco\n🔮Đường bay áp dụng: các đường bay nội địa BAV đang bán trên website TMĐT, trừ đường bay đi và đến Côn Đảo.\n❗Điều kiện áp dụng: Áp dụng theo điều kiện hạng giá vé đã mua\n",
            "coupons": [],
            "domain": "bambooairways.com",
            "end_time": "2021-03-27",
            "id": "5498845288268871151",
            "image": "https://static.accesstrade.vn/adv/img/deal_coupons-09-10-2020-wjbiby.png",
            "link": "https://www.bambooairways.com/vn-vi/thong-tin-dat-ve/uu-dai/mung-ngay-giai-phong-uu-dai-cuc-nong/",
            "merchant": "bambooairways",
            "name": "💥Chương trình “Mừng ngày giải phóng, ưu đãi cực nóng”💥",
            "start_time": "2020-10-09"
        },
        {
            "aff_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https%3A%2F%2Fwww.bambooairways.com%2Fvn-vi%2Fthong-tin-dat-ve%2Fuu-dai%2Fbay-chung-huong-uu-dai-khung%2F",
            "banners": [],
            "categories": [],
            "content": "Tạm biệt năm cũ với những lo lắng, bận rộn của công việc và cuộc sống. Chào năm mới cùng BAY CHUNG để tận hưởng phút giây hạnh phúc, thư giãn bên nhau.\nĐặc biệt nhận ngay ƯU ĐÃI KHỦNG, giảm đến 30% khi mua vé máy bay Bamboo Airways.\n",
            "coupons": [],
            "domain": "bambooairways.com",
            "end_time": "2021-02-11",
            "id": "5562086751721808205",
            "image": "https://static.accesstrade.vn/adv/img/deal_coupons-04-01-2021-c43xzq.png",
            "link": "https://www.bambooairways.com/vn-vi/thong-tin-dat-ve/uu-dai/bay-chung-huong-uu-dai-khung/",
            "merchant": "bambooairways",
            "name": "Chương trình \"Bay chung giảm khủng\"",
            "start_time": "2021-01-04"
        }
    ]
}
```


# Top các sản phẩm bán chạy nhất

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/top_products
```

Các biến params được truyền vào HTTP Request theo các cặp Key-Value, mở đầu chuỗi params bằng dấu “?” và giữa các biến phân tách nhau bằng dấu “&”. Vd:&#x20;

```
https://api.accesstrade.vn/v1/top_products?date_from=01-07-2020&date_to=20-07-2020
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Biến params | Required | Mô tả                                 |
| ----------- | -------- | ------------------------------------- |
| date\_from  | tùy chọn | Ngày filter bắt đầu, vd: ‘01-04-2016’ |
| date\_to    | tùy chọn | Ngày filter cuối, vd: ‘01-01-2016’    |
| merchant    | tùy chọn | Đối tác, vd: lazada                   |

#### Mô tả kết quả <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Value          | Mô tả                   |
| -------------- | ----------------------- |
| category\_id   | id danh mục sản phẩm    |
| category\_name | tên danh mục sản phẩm   |
| desc           | mô tả sản phẩm          |
| image          | ảnh sản phẩm            |
| link           | link sản phẩm           |
| aff\_link      | Affiliate link          |
| price          | giá sản phẩm chưa sale  |
| discount       | giá khuyến mại sản phẩm |
| total          | số lượng sản phẩm       |
| name           | tên sản phẩm            |
| product\_id    | id sản phẩm             |

> API response trả về (1 trong số 50 sản phẩm trả về)

```
{
    "data": [
        {
            "aff_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https%3A%2F%2Ffado.vn%2Fus%2Famazon%2Frazor-turbo-jetts-electric-heel-wheels-red-B076WVGLXS.html%3Fm%3DAGYUU318PHJM6",
            "brand": "",
            "category_id": "",
            "category_name": "Sports & Outdoors",
            "desc": null,
            "discount": 2869795.0,
            "image": "https://images-na.ssl-images-amazon.com/images/I/81259FdCzzL.jpg",
            "link": "https://fado.vn/us/amazon/razor-turbo-jetts-electric-heel-wheels-red-B076WVGLXS.html?m=AGYUU318PHJM6",
            "name": "Razor Turbo Jetts Electric Heel Wheels - Red",
            "price": 2869795.0,
            "product_category": "FADOTREN2000000",
            "product_id": "B076WVGLXS",
            "short_desc": null
        }
    ],
    "total": 1
}
```


# Errors

| Error Code | Meaning                                                               |
| ---------- | --------------------------------------------------------------------- |
| 400        | Bad Request – Your request sucks                                      |
| 401        | Unauthorized – Your API key is wrong                                  |
| 403        | Forbidden – This requested is hidden for administrators only          |
| 404        | Not Found – The specified API could not be found                      |
| 405        | Method Not Allowed – You tried to access a API with an invalid method |


# API PUBLISHER ENGLISH VERSION

Tài liệu API dành cho publisher trong hệ thống ACCESSRTRADE


# Authentication

All requests to the API will require a token in the header (including all methods: GET, POST, PUT…)

`Authorization: Token <access_key>`

`Content-Type: application/json`

Note: you must input the correct value for the key “Authorization” as: Token ‘your access\_key’ (Token + ‘space’ + ‘access\_token’) Access key can be found at `https://pub.accesstrade.vn/publisher_profile/personal_info?position=info`

![](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-MSg32oAivak2g9MoGId%2F-MSg4DHz7FtXxcxBaTGl%2Fimage.png?alt=media\&token=a7429e77-af72-4fe8-a1fe-9887690d9a29)


# Get the campaigns list

Get campaign list and campaing information

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/campaigns
```

Query parameter:

| Param        | Require  | Description                                  |
| ------------ | -------- | -------------------------------------------- |
| approval     | Optional | approved=successful filter registed campaign |
| campaign\_id | Optional | filter by campaign id                        |

```
https://api.accesstrade.vn/v1/campaigns?limit=20&page=25&approval=successful
```

Describe results

| Parameters              | Description                                                                                                                                                                                             |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| total                   | Number of campaigns.                                                                                                                                                                                    |
| data.id                 | Id of campaign.                                                                                                                                                                                         |
| data.name               | Name of campaign.                                                                                                                                                                                       |
| data.approval           | <ul><li>Unregistered: User has not register for the campaign. </li><li>Pending: Campaign request is in review waiting for approval. </li><li>Successful: User campaign’s request is approved.</li></ul> |
| data.status             | Status of the campaign: 1: Running                                                                                                                                                                      |
| data.merchant           | Name of the merchant.                                                                                                                                                                                   |
| data.conversion\_policy |                                                                                                                                                                                                         |
| data.cookie\_duration   | Time duration of the cookie (second).                                                                                                                                                                   |
| data.cookie\_policy     |                                                                                                                                                                                                         |
| data.description        | Description of the campaign.                                                                                                                                                                            |
| data.start\_time        | The start date of the campaign.                                                                                                                                                                         |
| data.end\_time          | The end date of the campaign                                                                                                                                                                            |
| data.category           | Campaign category                                                                                                                                                                                       |
| data.sub\_category      |                                                                                                                                                                                                         |
| data.type               | Campaign type                                                                                                                                                                                           |
| data.url                | Url campaign.                                                                                                                                                                                           |

#### Data Response:

```
{
    "data": [
        {
            "approval": "successful",
            "category": "",
            "cookie_duration": 0,
            "cookie_policy": "",
            "description": {
                "action_point": "<p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">Leads đạt chuẩn yêu cầu sau:<br style=\"line-height: normal; clear: both;\">- Sống và làm việc ở HN, HCM ( có giấy tạm trú/ Hộ khẩu)<br style=\"line-height: normal; clear: both;\">- Chú ý chất lượng lead sẽ cao hơn với các khách có nơi ở thuộc các Quận ở HCM và khu vực HN. Lí do: thu nhập khách ổn định ; có đầy đủ giấy tờ và có mục đích mở thẻ nghiêm túc.<br style=\"line-height: normal; clear: both;\">- Thu nhập ổn định trên 8tr nhận lương theo hình thức chuyển khoản từ công ty<br style=\"line-height: normal; clear: both;\">- Trên 21 tuổi<br style=\"line-height: normal; clear: both;\">- Có hợp đồng Lao động<br style=\"line-height: normal; clear: both;\">- Đồng ý mở thẻ Citi&nbsp;<br style=\"line-height: normal; clear: both;\"><span style=\"font-weight: 700;\">* Lưu ý:</span>&nbsp;Để tăng tỷ lệ duyệt, các bạn định vị đúng vị trí HN/ HCM khi chạy Google ads or FB ads , tránh tình trạng các khách ở tỉnh thành khác đăng ký.</p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">** Hệ thống sẽ tự động lọc và hủy các lead không đáp ứng đủ các điều kiện trên</p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"font-weight: 700; letter-spacing: 0.13px;\">Thời gian phê duyệt kết quả thành công</span><span style=\"letter-spacing: 0.13px;\">: 4 tuần</span></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"letter-spacing: 0.13px;\">Tips: Cách chạy FB ads hiệu quả: nhắm vào các đối tượng có hành vi sử dụng các sản phẩm dịch vụ đắt tiền :&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"letter-spacing: 0.13px;\">- theo loại điện thoai: Iphone 8 trở lên, Samsung Note 9, S9, v.v</span></p><p style=\"line-height: 20px;\"><span style=\"color: rgb(98, 98, 98); font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; letter-spacing: 0.13px;\">- Dịch vụ có khuyến mãi của Citibank:&nbsp;</span></p><p style=\"line-height: 20px;\"><font face=\"Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"letter-spacing: 0.13px;\"><a href=\"https://docs.google.com/spreadsheets/d/1S6MYtRM7RncXowxm2mSAKUmaGMCgW5nIEFmRCVq-hSA/edit#gid=363488021\" target=\"_blank\">https://docs.google.com/spreadsheets/d/1S6MYtRM7RncXowxm2mSAKUmaGMCgW5nIEFmRCVq-hSA/edit#gid=363488021</a></span></font></p>",
                "commission_policy": "<span style=\"color: rgb(98, 98, 98); font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; letter-spacing: 0.13px;\">315,000VNĐ / lead</span>",
                "cookie_policy": "<p>Thời gian lưu cookie 30 ngày</p><p>Không bị ghi đè cookie bởi các bên khác</p>",
                "introduction": "<p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"color: rgb(98, 98, 98); font-size: 0.875rem; letter-spacing: 0.13px;\">Citibank là ngân hàng toàn cầu với hơn 200 năm kinh nghiệm trên toàn thế giới và hơn 20 năm hoạt động tại Việt Nam. Citibank hiện đang cung cấp các sản phẩm Thẻ Tín Dụng đáp ứng với từng nhu cầu của khách hàng:</span><span style=\"color: rgb(98, 98, 98); font-size: 0.875rem; letter-spacing: 0.13px;\">&nbsp;</span><br></p><p><font face=\"Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"letter-spacing: 0.13px;\">Các Khuyến mãi của thẻ Citi Bank:&nbsp;</span></font><a href=\"https://docs.google.com/spreadsheets/d/1S6MYtRM7RncXowxm2mSAKUmaGMCgW5nIEFmRCVq-hSA/edit#gid=1390843872\">https://docs.google.com/spreadsheets/d/1S6MYtRM7RncXowxm2mSAKUmaGMCgW5nIEFmRCVq-hSA/edit#gid=1390843872</a></p><p><font face=\"Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif\"><span style=\"letter-spacing: 0.13px;\">Danh sách keyword gợi ý: https://docs.google.com/spreadsheets/d/1aynvlYySDdPxeXy7pzieTW4R7oIXfaZc9zso_GeJob0/edit#gid=94956797</span><br></font><br></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">Thẻ tín dụng Citi Cash Back: sản phẩm Thẻ Tín Dụng Citi giúp Hoàn Tiền Mặt tốt nhất thị trường hiện nay. Thẻ tín dụng Citi Cash Back giúp khách hàng sử dụng được hoàn tiền đến 5% chi tiêu. Khách hàng có thể hoàn tiền đến 7.200.000VND mỗi năm. Tiền hoàn lại không bao giờ hết hạn.</p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"font-weight: 700; letter-spacing: 0.13px;\">Sản phẩm bán chạy:</span><br></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">o Thẻ Citi Rewards</p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; font-size: 0.875rem;\">o Thẻ tín dụng Citi Cash Back</span></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><span style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; font-size: 0.875rem;\">o</span><span style=\"font-size: 0.875rem; letter-spacing: 0.13px;\">&nbsp;Thẻ Citi Simplicity+</span></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><b style=\"font-weight: bold; color: rgb(21, 27, 38); margin: 0px; padding: 0px; border: 0px; font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; vertical-align: baseline; letter-spacing: normal; white-space: pre-wrap;\">- Auto: Chiến dịch này sẽ được duyệt tự động. Sau khi đăng ký, bạn vui lòng chờ 5 phút và nhấn F5 (Refresh) để cập nhật trạng thái duyệt</b></p><p style=\"letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><b style=\"background-color: rgb(255, 255, 0);\">LƯU Ý: CHIẾN DỊCH CITIBANK SẼ TRACKING LƯỢNG CLICK VÀ ĐƠN HÀNG TRỰC TIẾP TRÊN WEBSITE CITIBANK, VÌ THẾ PUBLISHER SẼ KHÔNG XEM ĐƯỢC CLICK VÀ ĐƠN HÀNG TRẢ VỀ. </b></p><p style=\"letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><b style=\"background-color: rgb(255, 255, 0);\">ACCESSTRADE SẼ UPDATE TAY LƯỢNG ĐƠN HÀNG CHO PUB MỖI TUẦN 1 LẦN.&nbsp;</b></p><p style=\"color: rgb(98, 98, 98); letter-spacing: 0.13px; line-height: 20px; font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\"><br></p>",
                "other_notice": "<span style=\"font-weight: bolder; font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\">Citibank cấm chạy SEM brand name, nếu phát hiện sẽ bị khóa link &amp; cắt hoa hồng</span>",
                "rejected_reason": "<span style=\"color: rgb(98, 98, 98); font-family: &quot;Source Sans Pro&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; letter-spacing: 0.13px;\">Không thoả mãn 1 trong những điều kiện trên và không có nhu cầu.</span>",
                "traffic_building_policy": "<p>- Trong trường hợp publishers có nhu cầu liên hệ khách hàng để xác nhận thông tin qua điện thoại hoặc email marketing. Publishers phải gửi cho AT: kịch bản gọi và email mẫu để ngân hàng duyệt trước khi chính thức chạy hình thức liên hệ khách hàng để xác nhận thông tin. Trong trường hợp publishers chạy hình thức này mà không báo thông tin cho AT và ngân hàng, các chuyển đổi trong tháng có thể bị huỷ và ngân hàng có quyền truy cứu nếu thông tin publishers đưa tới khách hàng không chính xác và không được duyệt bởi Ngân hàng hoặc AT.&nbsp;</p><p>- Publisher sẽ không mạo danh thương hiệu Ngân hàng để tạo các trang mạng xã hội hoặc Websites.</p><p>- Các Publishers sẽ không được sử dụng các hình thức quảng cáo sau: Chèn đường dẫn vào các quảng cáo không liên quan, Dẫn dụ khách hàng nhấp vào đường dẫn khi khách hàng không biết , Sử dụng sai thông tin về sản phẩm của Ngân Hàng dẫn dụ khách hàng</p><p>- Các chuyển đổi trong tháng có thể bị huỷ nếu vi phạm các chính sách trên</p>"
            },
            "end_time": null,
            "id": "5585194803623188142",
            "logo": "https://static.accesstrade.vn/adv/img/1612752152_Citi-Logo.png",
            "merchant": "citibank_new",
            "name": "Citibank New",
            "scope": "private",
            "start_time": "2021-02-05T14:25:04.542000",
            "status": 1,
            "sub_category": "",
            "type": -1,
            "url": "https://www.citibank.com.vn/vietnamese/form/uu-dai-mo-the-tin-dung/index.htm"
        }
    ]
}
```

#### Example (Using tool Postman to call API) <a href="#v-d-minh-h-a-d-ng-tool-postman-call-api" id="v-d-minh-h-a-d-ng-tool-postman-call-api"></a>

![](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-MSg6h5Roo19HVDBiK4N%2F-MSg76Y3j3P8l--hcZ4D%2Fimage.png?alt=media\&token=a180de7f-27dc-4cf0-9209-191afebd0027)


# Create tracking link

API mô tả cách tạo tracking link của các campaign

**Method: POST**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/product_link/create
```

#### Data Parameter <a href="#query-parameters" id="query-parameters"></a>

| Params        | Required | Descriptions       |
| ------------- | -------- | ------------------ |
| campaign\_id  | Required | Campaign ID        |
| urls          | Optional | List link          |
| utm\_source   | Optional | Addition parameter |
| utm\_medium   | Optional | Addition parameter |
| utm\_campaign | Optional | Addition parameter |
| utm\_content  | Optional | Addition parameter |
| sub1          | Optional | Addition parameter |
| sub2          | Optional | Addition parameter |
| sub3          | Optional | Addition parameter |
| sub4          | Optional | Addition parameter |

> CURL Example
>
> ```
>
> curl --location 'https://api.accesstrade.vn//v1/product_link/create' \
> --header 'Content-Type: application/json' \
> --header 'Authorization: token {your_token}' \
> --data '{
>     "campaign_id": "4348614231480407268",
>     "urls": ["https://shopee.vn/m/ma-giam-gia","https://shopee.vn/m/ma-giam-gia1"],
>     "utm_source": "test_source",
>     "url_enc": true,
>     "utm_medium": "test_medium",
>     "utm_campaign": "test_campaign",
>     "utm_content": "test_content",
>     "sub1": "test_sub1",
>     "sub2": "test_sub2",
>     "sub3": "test_sub3"
>     }'
> ```

**API response:**

````
```json
{
    "data": {
        "error_link": [],
        "success_link": [
            {
                "aff_link": "https://tracking.dev.accesstrade.me/deep_link/4348611760548105593/4751584435713464237?utm_campaign=test_campaign&sub4=test_sub4&sub2=test_sub2&sub3=test_sub3&sub1=test_sub1&url=https%3A%2F%2Fshopee.vn&utm_content=test_content&utm_source=test_source&utm_medium=test_medium",
                "first_link": null,
                "short_link": "https://shorten.dev.accesstrade.me/ujrBHxpc",
                "url_origin": "https://shopee.vn"
            }
        ],
        "suspend_url": []
    },
    "success": true
}
```
````


# Get the list of commission ratio of campaign

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/commission_policies
```

#### Query Parameters <a href="#query-parameters" id="query-parameters"></a>

The parameters passed into HTTP Request according to Key-Value pair, begin the parameters with “?” and separate each parameter with the sign “&”. Ex:&#x20;

```
https://api.accesstrade.vn/v1/commission_policies?camp_id=5338806296999499238&month=01-2021
```

| Parameters | Required | Description                          |
| ---------- | -------- | ------------------------------------ |
| camp\_id   | Required | Id of campaign (URL detail campaign) |
| month      | Optional | Month the regulation is in operation |

#### Describe the results <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Parameters              | Description                                                                                                            |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| category.category\_id   | Category Id                                                                                                            |
| category.sales\_price   | Value of sales being split (fixed) per each successful conversion.                                                     |
| category.sales\_ratio   | The ratio of the split for the value of each sales for every successful conversion.                                    |
| category.taget\_month   | Active month(s).                                                                                                       |
| product.category\_id    | Product Id                                                                                                             |
| product.sales\_price    | Value of sales being split (fixed) per each successful conversion                                                      |
| product.sales\_ratio    | The ratio of the split for the value of each sales for every successful conversion.                                    |
| product.taget\_month    | Active month(s)                                                                                                        |
| default.result\_id      | Default commission types: 1 - Fixed price. 3 - Split according to each product. 30 - Split according to each category. |
| default.reward\_type    | Method of calculating commission: 1 - Calculating default price. 2 - Calculating ration per value of order.            |
| default.sales\_price    | Value of sales being split (fixed) per each successful conversion.                                                     |
| default.sales\_ratio    | The ratio of the split for the value of each sales for every successful conversion.                                    |
| default.taget\_month    | Active month(s)                                                                                                        |
| category.category\_id   | Category Id                                                                                                            |
| category.sales\_price   | Value of sales being split (fixed) per each successful conversion.                                                     |
| category.sales\_ratio   | The ratio of the split for the value of each sales for every successful conversion.                                    |
| category.customer\_type | Type of customer. Example: new user/ old user, app user/ web user                                                      |

#### Example (Using Postman tool to call API) <a href="#v-d-minh-h-a-d-ng-tool-postman-call-api" id="v-d-minh-h-a-d-ng-tool-postman-call-api"></a>

```
{
    "category": [
        {
            "category_id": "Tren 10",
            "category_name": null,
            "customer_type": null,
            "sales_price": 200000.0,
            "sales_ratio": 0.0,
            "taget_month": "01/2021"
        },
        {
            "category_id": "Tu 1-4",
            "category_name": null,
            "customer_type": null,
            "sales_price": 160000.0,
            "sales_ratio": 0.0,
            "taget_month": "01/2021"
        },
        {
            "category_id": "Tu 5-9",
            "category_name": null,
            "customer_type": null,
            "sales_price": 175000.0,
            "sales_ratio": 0.0,
            "taget_month": "01/2021"
        },
        {
            "category_id": "cat_129739_rank6",
            "category_name": null,
            "customer_type": null,
            "sales_price": 200000.0,
            "sales_ratio": 0.0,
            "taget_month": "01/2021"
        },
        {
            "category_id": "cat_3982_rank6",
            "category_name": null,
            "customer_type": null,
            "sales_price": 200000.0,
            "sales_ratio": 0.0,
            "taget_month": "01/2021"
        }
    ],
    "default": [
        {
            "customer_type": null,
            "result_id": 30,
            "reward_type": 1,
            "sales_price": 160000.0,
            "sales_ratio": 0.0,
            "taget_month": "01/2021"
        }
    ],
    "product": []
}
```


# Get the list of transaction

HTTP Request

```
https://api.accesstrade.vn/v1/transactions
```

#### Note:

* **Limit: 10 requests / 1 minute**

Query Parameters

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:

```
https://api.accesstrade.vn/v1/transactions?since=2021-01-01T00:00:00Z&until=2021-01-03T00
```

| Parametter          | Required | Description                                                                                                                                                   |
| ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| since               | Required | Time the report begins, according to ISO format, example “2019-08-01T00:00:00Z”                                                                               |
| until               | Required | Time the report ends, according to ISO format, example “2019-08-01T00:00:00Z”                                                                                 |
| page                | Optional | Page order. Starting from 1. Default 1                                                                                                                        |
| offset              | Optional | Offset value, default 0.                                                                                                                                      |
| limit               | Optional | Number of orders returned per page. Default 100.                                                                                                              |
| merchant            | Optional | Merchant name. ex: tikivn.                                                                                                                                    |
| utm\_source         | Optional | Ex: facebook                                                                                                                                                  |
| utm\_campaign       | Optional |                                                                                                                                                               |
| utm\_medium         | Optional | Ex: email                                                                                                                                                     |
| utm\_content        | Optional |                                                                                                                                                               |
| status              | Optional | <p>Status</p><ul><li>0: hold</li><li>1: approved</li><li>2: rejected</li></ul>                                                                                |
| is\_confirmed       | Optional | <p>Transaction status:</p><ul><li>0: unapproved</li><li>1: approved (If there is is\_confirmed parameter but no status, the default field status=1)</li></ul> |
| transaction\_id     | Optional | Transaction codes, can filter 1 (transaction\_id=1234567) or multiple (transaction\_id=1234567,7654321) using commas "," to separate codes.                   |
| update\_time\_start | Optional | Report start time according to transaction update time (ISO format), for example “2016-08-01T00:00:00Z”.                                                      |
| update\_time\_end   | Optional | Report end time according to transaction update time (ISO format), for example “2016-08-01T00:00:00Z”.                                                        |

API response returns:

```
"total": 4147,
    "data": [
        {
            "merchant": "tikivn",
            "status": 1,
            "update_time": "2022-07-19T17:32:35",
            "click_url": "https://ti.ki/add/TNWGVSKG?utm_term=TAPM.Yr8FIzkUqtxX6WDq6wmjdLH9nzfwPYBgD8nSkKOaR8B3lolr_TAPP.684099_TAPT.TI3&TIKI_URI=https%3A%2F%2Ftiki.vn&atnct1=44f683a84163b3523afe57c2e008bc8c&atnct2=Yr8FIzkUqtxX6WDq6wmjdLH9nzfwPYBgD8nSkKOaR8B3lolr&atnct3=PkIKY0000nw00enur",
            "conversion_platform": "mobile_app",
            "utm_campaign": "4348614231480407268",
            "product_category": "1520_app",
            "utm_content": "",
            "transaction_time": "2022-05-03T02:31:19",
            "product_image": "",
            "utm_source": "123488589",
            "transaction_value": 442000.0,
            "_extra": {
                "parameters": {
                    "utm_campaign": "4348614231480407268",
                    "click_url": "https://ti.ki/add/TNWGVSKG?utm_term=TAPM.Yr8FIzkUqtxX6WDq6wmjdLH9nzfwPYBgD8nSkKOaR8B3lolr_TAPP.684099_TAPT.TI3&TIKI_URI=https%3A%2F%2Ftiki.vn&atnct1=44f683a84163b3523afe57c2e008bc8c&atnct2=Yr8FIzkUqtxX6WDq6wmjdLH9nzfwPYBgD8nSkKOaR8B3lolr&atnct3=PkIKY0000nw00enur",
                    "click_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Mobile/15E148 Safari/604.1",
                    "at_unique_id": "7sFsxcWKOWYPunC3BCfg6Znxat",
                    "utm_tool": "deeplink",
                    "utm_source": "123488589"
                },
                "device_model": "iPhone",
                "device_family": "iPhone",
                "device_brand": "Apple",
                "device_type": "mobile",
                "device": "Apple iPhone",
                "os": "iOS",
                "browser": "Mobile Safari"
            },
            "reason_rejected": "",
            "category_name": "Sức khỏe và làm đẹp_app",
            "utm_term": "",
            "product_id": "9446586652188@tikivn@9446586652188",
            "is_confirmed": 0,
            "confirmed_time": "2022-06-30T23:59:59",
            "product_price": 442000.0,
            "id": "9591ccbef06080a1dd8f98d9b371537e",
            "commission": 53040.0,
            "customer_type": "",
            "conversion_id": 115157422,
            "utm_medium": "",
            "product_quantity": 1,
            "click_time": "2022-05-03T02:18:56",
            "product_name": "",
            "transaction_id": "602528593"
        }
```

Description of results:

| Parametter                | Description                                                                                             |
| ------------------------- | ------------------------------------------------------------------------------------------------------- |
| total                     | Number of conversions, calculated by product.                                                           |
| data.status               | <p>Status of conversion</p><ul><li>0: Pending or hold</li><li>1: Approved</li><li>2:Rejected.</li></ul> |
| data.merchant             | Merchant name                                                                                           |
| data.click\_time          | Click time                                                                                              |
| data.transaction\_id      | Transaction ID (Order).                                                                                 |
| data.transaction\_time    | Transaction time, according to ISODate.                                                                 |
| data.update\_time         | Time to update transaction information, according to ISODate.                                           |
| data.confirmed\_time      | Transaction approval time, according to ISODate.                                                        |
| data.is\_confirmed        | Transaction status: 0 - unapproved, 1 - approved                                                        |
| data.transaction\_value   | Transaction value.                                                                                      |
| data.commission           | Commissions for publishers.                                                                             |
| data.product\_id          | Product ID.                                                                                             |
| data.product\_price       | Price of the product.                                                                                   |
| data.product\_quantity    | The quantity of products.                                                                               |
| data.\_extra              | Information related to the operating system and browser.                                                |
| data.\_utm\*              | Utm parameter values.                                                                                   |
| data.category\_name       | Category name                                                                                           |
| data.conversion\_id       | ID of conversion                                                                                        |
| data.conversion\_platform | The foundations of conversion                                                                           |
| data.customer\_type       | Customer type                                                                                           |
| data.product\_category    | Category of product                                                                                     |
| data.product\_image       | Image of product                                                                                        |
| data.product\_name        | Product name                                                                                            |
| data.reason\_reject       | Reason reject                                                                                           |


# Get the list of order v2

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/order-list
```

#### Note:  <a href="#query-parameters" id="query-parameters"></a>

* #### **Limit: 10 requests / 1 minute** <a href="#query-parameters" id="query-parameters"></a>
* **Cache 1 minute**

#### Query Parameters <a href="#query-parameters" id="query-parameters"></a>

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:&#x20;

```
https://api.accesstrade.vn/v1/order-list?since=2021-01-01T00:00:00Z&until=2021-01-10T00:00:00Z

```

| Parameters    | Required | Description                                                                                                  |
| ------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| since         | Required | Time the report begins, according to ISO format, example “2019-08-01T00:00:00Z”                              |
| until         | Required | Time the report ends, according to ISO format, example “2019-08-01T00:00:00Z”                                |
| utm\_source   | Optional | Ex: facebook                                                                                                 |
| utm\_campaign | Optional |                                                                                                              |
| utm\_medium   | Optional | Ex: email                                                                                                    |
| utm\_content  | Optional |                                                                                                              |
| page          | Optional | Page order. Starting from 1. Default 1                                                                       |
| limit         | Optional | Number of orders returned per page. Default 30. Up to 300 (if you fill in more than 300, default set to 300) |
| status        | Optional | <p>Conversion status</p><ul><li> 0: Pending or hold</li><li> 1: Approved</li><li>2: Rejected</li></ul>       |
| merchant      | Optional | Example: adayroi, lazada                                                                                     |

RESPONSE

```
{
"data": 
    [
       {
           "at_product_link": "https://shopee.vn/universal-link/product/214196144/17730719201?utm_campaign=&c=679&af_reengagement_window=7d&af_click_lookback=7d&smtt=0.549607455-1653894909.9&utm_content=XDbU5H4Qjy87NtFmlCNrsEo4jtBMzjvPRv3EON3JTvinCYXR-540355-679-IG-&af_siteid=an_17156540000&pid=affiliates&utm_source=an_17156540000&is_retargeting=true&referer=at-kol-new&af_sub_siteid=540355&utm_medium=affiliates&af_viewthrough_lookback=1d&atnct1=ca9c267dad0305d1a6308d2a0cf1c39c&atnct2=XDbU5H4Qjy87NtFmlCNrsEo4jtBMzjvPRv3EON3JTvinCYXR&atnct3=h50RJ00079r00bkxv",
           "billing": 69000.0,
           "browser": "Mobile Safari UI/WKWebView",
           "category_name": "Fashion_Accessories",
           "click_time": "2022-05-31T00:28:09",
           "client_platform": "mobile",
           "confirmed_time": "2022-07-01T23:59:31",
           "conversion_platform": null,
           "customer_type": null,
           "is_confirmed": 0,
           "landing_page": "https://www.instagram.com/",
           "merchant": "shopee_kolnew",
           "order_id": "220602QAVKQKCM",
           "order_pending": 0,
           "order_reject": 0,
           "order_approved": 1,
           "product_category": "Phu_Kien_Thoi_Trang",
           "products_count": 1,
           "pub_commission": 2208.0,
           "sales_time": "2022-06-01T23:59:31",
           "update_time": "2022-07-07T10:23:13",
           "utm_campaign": null,
           "utm_content": null,
           "utm_medium": null,
           "utm_source": "IG",
           "website": "https://www.instagram.com/",
           "website_url": "https://www.instagram.com/"
       }
   ],
   "total": 589
}
```

#### Describe results <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Parametters               | Description                                                                       |
| ------------------------- | --------------------------------------------------------------------------------- |
| data.at\_product\_link    | Product tracking link                                                             |
| data.billing              | Order value                                                                       |
| data.browser              | Order generation platform                                                         |
| data.category\_name       | Category name                                                                     |
| data.click\_time          | Click time                                                                        |
| data.client\_platform     | Client Platform                                                                   |
| data.confirmed\_time      | Confirmed time                                                                    |
| data.conversion\_platform | Conversion platform                                                               |
| data.customer\_type       | Customer type                                                                     |
| data.is\_confirmed        | <p>Transaction for control approval status:<br>0 - unapproved<br>1 - approved</p> |
| data.landing\_page        | Landing page                                                                      |
| data.merchant             | Merchant name                                                                     |
| data.order\_id            | Order ID                                                                          |
| data.order\_pending       | Number of orders in pending                                                       |
| data.order\_reject        | Number of orders in rejected                                                      |
| data.order\_approved      | Number of orders in approved                                                      |
| data.product\_category    | Category of the product                                                           |
| data.products\_count      | Total number of products                                                          |
| data.pub\_commission      | Commission for publishers                                                         |
| data.sales\_time          | Sales time                                                                        |
| data.update\_time         | Update time                                                                       |
| data.utm\_campaign        | Utm campaign                                                                      |
| data.utm\_content         | Utm content                                                                       |
| data.utm\_medium          | Utm medium                                                                        |
| data.utm\_source          | Utm source                                                                        |
| data.website              | Website                                                                           |
| data.website\_url         | Website url                                                                       |


# Get products information of the order

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/order-products
```

**\*Note: Limit: 10 requests / 1 minute**

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:&#x20;

```
https://api.accesstrade.vn/v1/order-products?order_id=012345678&merchant=shopee_kolnew
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Parameters | Required | Description                                         |
| ---------- | -------- | --------------------------------------------------- |
| order\_id  | Required | Order\_id of the order (get the order\_v2 api side) |
| merchant   | Required | ProMerchant name. Example: adayroi, lazada          |
| page       | Optional | Page order. Starting from 1. Default 1              |
| limit      | Optional | Number of orders returned per page.                 |

**RESPONSE**

```
{
    "data": 
    [
        {
            "_at": 
            {
                "banner_id": 9419,
                "commission_type": 2,
                "goods_id": "1788784899_VNAMZ-8035509904@lazada_cashback@1788784899_VNAMZ-8035509904",
                "result_id": 30,
                "reward_type": 2,
                "seq_no": 118228959,
                "vn_click_id": ""
            },
            "_extra": 
            {
                "browser": "Chrome Mobile",
                "device": "Generic Generic Smartphone",
                "device_brand": "Generic",
                "device_family": "Generic Smartphone",
                "device_model": "Smartphone",
                "device_type": "mobile",
                "os": "Android",
                "parameters": 
                {
                    "at_unique_id": "_G0GGDRV72f40ncIeZeRPinxat",
                    "click_url": "https://c.lazada.vn/t/c.ZCM0dX?sub_aff_id=wNsfVI1B2Rp7y16Fnbmd4ykro1GDM0LuNVmmV3SgScFgQffd&url=https%3A%2F%2Fwww.lazada.vn%2F&sub_id1=684099&atnct1=71a3cb155f8dc89bf3d0365288219936&atnct2=wNsfVI1B2Rp7y16Fnbmd4ykro1GDM0LuNVmmV3SgScFgQffd&atnct3=SKTej00079n00enur",
                    "click_user_agent": "Mozilla/5.0 (Linux; U; Android 12; vi-vn; CPH2113 Build/SKQ1.210216.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.88 Mobile Safari/537.36 HeyTapBrowser/45.8.4.1",
                    "utm_campaign": "5249638763776692551",
                    "utm_source": "123494162",
                    "utm_tool": "deeplink"
                }
            },
            "_id": "1788784899_VNAMZ-8035509904@lazada_cashback@1788784899_VNAMZ-8035509904",
            "billing": 
            {
                "approved": 0,
                "pending": 0,
                "reject": 129700.0
            },
            "campaign_id": "677",
            "click_time": "2022-05-21T19:54:32",
            "commission": 
            {
                "approved": 0,
                "pending": 0,
                "reject": 3774.0
            },
            "confirmed_time": "2022-06-10T09:59:16",
            "merchant": "lazada_cashback",
            "product_price": 129700.0,
            "product_quantity": 1,
            "quantity": 
            {
                "approved": 0,
                "pending": 0,
                "reject": 1
            },
            "reason_rejected": "N/A",
            "sales_time": "2022-05-21T19:58:00"
        }
    ]
    "total: 1
}
```

#### Describe results <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Parametters            | Description                                                                                                                                                                               |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| data.\_at              | Information related to tracking                                                                                                                                                           |
| data.extra             | Information about browsers and operating systems to access                                                                                                                                |
| data.\_id              | Product ID                                                                                                                                                                                |
| data.billing           | <p>Product value (excluding discount)<br>Approved: product value in approved<br><br>Pending: product value in pending<br><br>Reject: product value in rejected</p>                        |
| data.campaign\_id      | Campaign ID                                                                                                                                                                               |
| data.click\_time       | Click time                                                                                                                                                                                |
| data.commission        | <p>Commission for publisher<br>Approved: Commission for publisher in approved<br><br>Pending: Commission for publisher in pending<br><br>Reject: Commission for publisher in rejected</p> |
| data.confirmed\_time   | Confirmed time                                                                                                                                                                            |
| data.merchant          | Merchant name                                                                                                                                                                             |
| data.product\_price    | Product price                                                                                                                                                                             |
| data.product\_quantity | <p>Total quantity product<br>Approved: Total quantity product in approved<br><br>Pending: Total quantity product in pending<br><br>Reject: Total quantity product in rejected</p>         |
| data.reason\_reject    | Reason reject                                                                                                                                                                             |
| data.sale\_time        | Sale time                                                                                                                                                                                 |


# Get detailed information of the product

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/product_detail
```

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:&#x20;

```
https://api.accesstrade.vn/v1/product_detail?merchant=fpt_longchau&product_id=00033675--80799010-N-1&transaction_id=80799016941733898708944
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Parameters  | Required | Description          |
| ----------- | -------- | -------------------- |
| merchant    | Required | Ex: adayroi, lazada. |
| product\_id | Required | Product Id           |

#### Example (Using Postman tool to call API) <a href="#v-d-minh-h-a-d-ng-tool-postman-call-api" id="v-d-minh-h-a-d-ng-tool-postman-call-api"></a>

![](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-MSg8ZJMVhKhl89TOin-%2F-MSg8qeJXZd4d5Ad4C8O%2Fimage.png?alt=media\&token=e00f476c-8f24-469f-b63d-88079a82d1f9)

RESPONSE

```
{
    "name": "Xiaomi Mi5s 64GB (Đen)",
    "price": 6090000.0,
    "short_desc": "Xiaomi Mi 5s - Phiên bản nâng cấp hoàn hảo của Mi5Xiaomi Mi 5s cuối cùng cũng đã chính thức ra mắt vào ngày hôm nay 27/9/2016 đúng như thông tin mà hãng điện thoại Trung Quốc tiết lộ trước đó. Giống như tin đồn rò rỉ trước đó chiếc điện thoại thông minh Xiaomi Mi 5s được trang bị cảm biển siêu âm cùng nhiều tính năng mới mẽ. Xiaomi Mi 5s Xiaomi Mi 5s Không chỉ được trang bị nhiều tính năng mới mà mẫu flagship Xiaomi Mi 5s còn được trang bị cấu hình mạnh mẽ với chip Snapdragon 821 mới nhất, RAM 4/6GB đây được xem là bản nâng cấp đáng giá của Xiaomi Mi5 ra mắt trước đó. Đánh giá thiết kế Xiaomi Mi 5s: Cũng giống như những mẫu smartphone cao cấp gần đây của hãng Xiaomi Mi 5s vẫn được làm bằng bộ khung kim loại nguyên khối cao cấp và sang trọng. Mặt trước và sau của máy được bo cong 2.5D tạo cảm giác cầm thoải mái mà không bị cấn tay. Điện thoại này sẽ có số đo kích thước lần lượt là 145.6 x 70.3 x 8.3 mm và nặng 145 g. Hình ảnh thiết kế Xiaomi Mi 5s:Xiaomi Mi 5s sẽ bán ra với 4 màu Silver, Gray, Gold, Rose Gold Xiaomi Mi 5s sẽ bán ra với 4 màu Silver, Gray, Gold, Rose Gold Smartphone này cũng sử dụng cổng kết nối USB Type-C mới nhất Smartphone này cũng sử dụng cổng kết nối USB Type-C mới nhất Màn hình Xiaomi Mi 5s được vát cong 2.5D Màn hình Xiaomi Mi 5s được vát cong 2.5D Xiaomi Mi 5s được trang bị cảm biến vân tay siêu âm mới Xiaomi Mi 5s được trang bị cảm biến vân tay siêu âm mới Đánh giá màn hình Xiaomi Mi 5s:Màn hình Xiaomi Mi 5s có độ sáng lên đến 600nit Màn hình Xiaomi Mi 5s có độ sáng lên đến 600nit Về màn hình thì Xiaomi Mi 5s chĩnh hãng vẫn có kích thước tương tự người tiền nhiệm là 5.15 inches độ phân giải Full HD (1080 x 1920 pixels) và mật độ điểm ảnh là 428 ppi. Tấm nền IPS LCD quen thuộc cho hình ảnh hiển thị sắc nét, màu sắc chân thực. Đánh giá camera Xiaomi Mi 5s:Trong khi đó về khả năng chụp ảnh Xiaomi Mi 5s được trang bị camera chính dùng cảm biến Sony IMX 378 có độ phân giải 12 MP, khẩu độ f/2.0 cùng đèn dual-LED flash trợ sáng. Camera này cũng có khả năng lấy nét theo pha, nhận diện khuôn mặt, nụ cười, chụp panorama, auto-HDR và hỗ trợ quay video chất lượng 2160p@30fps. Ở mặt trước Xiaomi Mi 5s còn có camera phụ UltraPixel độ phân giải 4 MP, cùng khẩu độ f/2.0 cho góc rộng hỗ trợ tốt việc chụp ảnh 'tự sướng'Xiaomi Mi 5s đọ ảnh chụp cùng iPhone 6s Plus và Galaxy S7 Edge Xiaomi Mi 5s đọ ảnh chụp cùng iPhone 6s Plus và Galaxy S7 Edge Điện thoại Xiaomi Mi 5s hỗ trợ quay phim 4K Điện thoại Xiaomi Mi 5s hỗ trợ quay phim 4K Đánh giá cấu hình Xiaomi Mi 5s:Cung cấp sức mạnh cho điện thoại Xiaomi Mi 5s là bộ vi xử lý Qualcomm MSM8996 Snapdragon 821 4 nhân (với 2 nhân có tốc độ xung nhịp là 2.15 GHz Kryo và 2 nhân tốc độ 1.6 GHz Kryo) mới nhất hiện nay chỉ vừa xuất hiện trên LeEco Le Pro 3 ra mắt không lâu trước đó. Đi kèm theo đó là chip đồ họa Adreno 530. Cũng giống như sản phẩm tiền nhiệm Xiaomi Mi 5s sẽ có 2 phiên bản tùy chọn RAM 3 GB bộ nhớ trong lưu trữ 64 GB và RAM 4GB bộ nhớ trong tương ứng là 128 GB.",
    "discount": 6090000.0,
    "link": "https://shopee.vn/Xiaomi-Mi5s-64GB--%C4%90en--i.15748.175638206",
    "image": "http://cf.shopee.vn/file/e0e45887d41f8024f98cdf1ede10017f",
    "desc": "Xiaomi Mi 5s - Phiên bản nâng cấp hoàn hảo của Mi5Xiaomi Mi 5s cuối cùng cũng đã chính thức ra mắt vào ngày hôm nay 27/9/2016 đúng như thông tin mà hãng điện thoại Trung Quốc tiết lộ trước đó. Giống như tin đồn rò rỉ trước đó chiếc điện thoại thông minh Xiaomi Mi 5s được trang bị cảm biển siêu âm cùng nhiều tính năng mới mẽ. Xiaomi Mi 5s Xiaomi Mi 5s Không chỉ được trang bị nhiều tính năng mới mà mẫu flagship Xiaomi Mi 5s còn được trang bị cấu hình mạnh mẽ với chip Snapdragon 821 mới nhất, RAM 4/6GB đây được xem là bản nâng cấp đáng giá của Xiaomi Mi5 ra mắt trước đó. Đánh giá thiết kế Xiaomi Mi 5s: Cũng giống như những mẫu smartphone cao cấp gần đây của hãng Xiaomi Mi 5s vẫn được làm bằng bộ khung kim loại nguyên khối cao cấp và sang trọng. Mặt trước và sau của máy được bo cong 2.5D tạo cảm giác cầm thoải mái mà không bị cấn tay. Điện thoại này sẽ có số đo kích thước lần lượt là 145.6 x 70.3 x 8.3 mm và nặng 145 g. Hình ảnh thiết kế Xiaomi Mi 5s:Xiaomi Mi 5s sẽ bán ra với 4 màu Silver, Gray, Gold, Rose Gold Xiaomi Mi 5s sẽ bán ra với 4 màu Silver, Gray, Gold, Rose Gold Smartphone này cũng sử dụng cổng kết nối USB Type-C mới nhất Smartphone này cũng sử dụng cổng kết nối USB Type-C mới nhất Màn hình Xiaomi Mi 5s được vát cong 2.5D Màn hình Xiaomi Mi 5s được vát cong 2.5D Xiaomi Mi 5s được trang bị cảm biến vân tay siêu âm mới Xiaomi Mi 5s được trang bị cảm biến vân tay siêu âm mới Đánh giá màn hình Xiaomi Mi 5s:Màn hình Xiaomi Mi 5s có độ sáng lên đến 600nit Màn hình Xiaomi Mi 5s có độ sáng lên đến 600nit Về màn hình thì Xiaomi Mi 5s chĩnh hãng vẫn có kích thước tương tự người tiền nhiệm là 5.15 inches độ phân giải Full HD (1080 x 1920 pixels) và mật độ điểm ảnh là 428 ppi. Tấm nền IPS LCD quen thuộc cho hình ảnh hiển thị sắc nét, màu sắc chân thực. Đánh giá camera Xiaomi Mi 5s:Trong khi đó về khả năng chụp ảnh Xiaomi Mi 5s được trang bị camera chính dùng cảm biến Sony IMX 378 có độ phân giải 12 MP, khẩu độ f/2.0 cùng đèn dual-LED flash trợ sáng. Camera này cũng có khả năng lấy nét theo pha, nhận diện khuôn mặt, nụ cười, chụp panorama, auto-HDR và hỗ trợ quay video chất lượng 2160p@30fps. Ở mặt trước Xiaomi Mi 5s còn có camera phụ UltraPixel độ phân giải 4 MP, cùng khẩu độ f/2.0 cho góc rộng hỗ trợ tốt việc chụp ảnh 'tự sướng'Xiaomi Mi 5s đọ ảnh chụp cùng iPhone 6s Plus và Galaxy S7 Edge Xiaomi Mi 5s đọ ảnh chụp cùng iPhone 6s Plus và Galaxy S7 Edge Điện thoại Xiaomi Mi 5s hỗ trợ quay phim 4K Điện thoại Xiaomi Mi 5s hỗ trợ quay phim 4K Đánh giá cấu hình Xiaomi Mi 5s:Cung cấp sức mạnh cho điện thoại Xiaomi Mi 5s là bộ vi xử lý Qualcomm MSM8996 Snapdragon 821 4 nhân (với 2 nhân có tốc độ xung nhịp là 2.15 GHz Kryo và 2 nhân tốc độ 1.6 GHz Kryo) mới nhất hiện nay chỉ vừa xuất hiện trên LeEco Le Pro 3 ra mắt không lâu trước đó. Đi kèm theo đó là chip đồ họa Adreno 530. Cũng giống như sản phẩm tiền nhiệm Xiaomi Mi 5s sẽ có 2 phiên bản tùy chọn RAM 3 GB bộ nhớ trong lưu trữ 64 GB và RAM 4GB bộ nhớ trong tương ứng là 128 GB.",
    "category_id": "",
    "brand": "",
    "category_name": "Mobile & Accessories"
}
```


# Get Datafeeds information

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/datafeeds
```

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:&#x20;

```
https://api.accesstrade.vn/v1/datafeeds?domain=lazada.vn&sku=AN273FAAA1FXLXVNAMZ-2293380
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Parameters             | Required | Description                                                             |
| ---------------------- | -------- | ----------------------------------------------------------------------- |
| campaign               | Optional | Merchant of the product owner                                           |
| domain                 | Optional | Domain of the product owner                                             |
| discount\_amount\_from | Optional | Filter discount rate from                                               |
| discount\_amount\_to   | Optional | Filter discount rate until                                              |
| discount\_rate\_from   | Optional | lọc tỷ lệ giá được giảm từ                                              |
| discount\_rate\_to     | Optional | lọc tỷ lệ giá được giảm đến                                             |
| page                   | Optional | Input page order to get, max = total/limit. Default = 1                 |
| limit                  | Optional | Amount of product needed, default is 50, max = 200                      |
| price\_from            | Optional | Filter price from                                                       |
| price\_to              | Optional | Filter price to                                                         |
| discount\_from         | Optional | Filter discount price from                                              |
| discount\_to           | Optional | Filter discount price to                                                |
| status\_discount       | Optional | Filter according to discount status. 0 - no discount, 1 - has discount. |
| update\_from           | Optional | Filter update time of datafeed from. Ex. 08-09-2017                     |
| update\_to             | Optional | Filter update time of datafeed to. Ex. 08-09-2018                       |

#### Result Description <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Key              | Mô tả                                                 |
| ---------------- | ----------------------------------------------------- |
| cate             | Category of product                                   |
| desc             | Describe product information                          |
| discount         | Price after discount                                  |
| campaign         | Campaign                                              |
| domain           | Domain of product owner                               |
| image            | Url of product image                                  |
| name             | Product name                                          |
| price            | Price of product before discount                      |
| product\_id      | Product id                                            |
| sku              | Product code                                          |
| url              | Product link                                          |
| aff\_link        | Deep link                                             |
| status\_discount | Status of discount. 0 - no discount, 1 - has discount |
| discount\_amount | Price of the discount                                 |
| discount\_rate   | Percentage being discounted                           |
| update\_time     | Update time                                           |

#### Example (Using Postman tool to call API) <a href="#v-d-minh-h-a-d-ng-tool-postman-call-api" id="v-d-minh-h-a-d-ng-tool-postman-call-api"></a>

![](https://3474731822-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MSBJ-5ZCTxCvaz8TirO%2F-MSg8xxE6V0K_AhgwlGN%2F-MSg9MI_08P0dUmy_fW3%2Fimage.png?alt=media\&token=1fbdf80f-7176-40c5-a32e-68063805b0af)

```
{
    "data": [
        {
            "aff_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https%3A%2F%2Fwww.lazada.vn%2Fao-thun-cao-cap-hinh-star-wars-coffee-mitadi-aste072-2423013.html",
            "campaign": "lazadaapp",
            "cate": "thoi-trang-my-pham",
            "desc": null,
            "discount": 175000.0,
            "discount_amount": 0.0,
            "discount_rate": 0.0,
            "domain": "lazada.vn",
            "image": "https://vn-live-01.slatic.net/p/7/ao-thun-cao-cap-hinh-star-wars-coffee-mitadi-aste072-1479373990-3103242-3b4b9c7018198c05f648390fb741036c-product.jpg",
            "merchant": "lazadaapp",
            "name": "Áo Thun Cao Cấp Hình Star Wars Coffee - MITADI – ASTE072",
            "price": 175000.0,
            "product_id": "224_AN273FAAA1FXLXVNAMZ-2293380",
            "promotion": null,
            "sku": "AN273FAAA1FXLXVNAMZ-2293380",
            "status_discount": 0,
            "update_time": "24-07-2018T01:02:19",
            "url": "https://www.lazada.vn/ao-thun-cao-cap-hinh-star-wars-coffee-mitadi-aste072-2423013.html"
        }
    ],
    "total": 1
}
```


# Get promotional information

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/offers_informations
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:&#x20;

```
https://api.accesstrade.vn/v1/offers_informations?merchant=bambooairways
```

| Parameters | Required | Description                                                                                                                                                             |
| ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| scope      | Optional | Input the value of this parameter as “expiring” to get discounts that are about to expire. Get all discount if the value is not passed in or passed in incorrectly.     |
| merchant   | Optional | Name of the owner distributing the discount                                                                                                                             |
| categories | Optional | Category\_name of the discount. Ex: voucher-services. You can enter more than one category, separating each one using the sign “,”                                      |
| domain     | Optional | Domain of the discount. Ex: lazada.vn                                                                                                                                   |
| coupon     | Optional | Input the value as 1 to get the discount with coupon code, 0 to get the discount without coupon code. The default is all.                                               |
| status     | Optional | Input the value 1 to get information of offers that are active, input the value 0 to get information of offers that have expired, and leave this value bank to get all. |
| limit      | Optional | Number of promotion will be show on one page. Example: Limit=50                                                                                                         |
| page       | optional | Number of page. Example: page=1                                                                                                                                         |

#### Describe Results <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Key         | Description                                                                                                                                 |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| banners     | Is a list that contains dictionaries of banner, each dictionary includes: “link” - url banner, “width” - size width, “height” - size height |
| content     | Content the discount in detail                                                                                                              |
| id          | Discount Id                                                                                                                                 |
| image       | Url of the discount image                                                                                                                   |
| link        | Url of the discount                                                                                                                         |
| merchant    | Owner offering discount                                                                                                                     |
| categories  | List of discount categories                                                                                                                 |
| name        | Name of discount                                                                                                                            |
| start\_time | Start time of the discount                                                                                                                  |
| end\_time   | End time of the discount                                                                                                                    |
| domain      | Domain of the discounted product                                                                                                            |
| aff\_link   | Affiliate link                                                                                                                              |

#### Example (Use Postman tool to call API) <a href="#v-d-minh-h-a-d-ng-tool-postman-call-api" id="v-d-minh-h-a-d-ng-tool-postman-call-api"></a>

[![offer\_information.png](http://docs.accesstrade.vn/publishers/images/promotion.png)](https://drive.google.com/file/d/146kaPpsCtoCmJx1zaBCDDODPUjYKDS8u/view?usp=sharing)

RESPONSE

```
{
    "data": [
        {
            "aff_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https%3A%2F%2Fwww.bambooairways.com%2Fvn-vi%2Fthong-tin-dat-ve%2Fuu-dai%2Fmung-ngay-giai-phong-uu-dai-cuc-nong%2F",
            "banners": [],
            "categories": [],
            "content": "⭐Giá sản phẩm: đồng giá 10,000 VNĐ (base fare (giá cơ sở), chưa bao gồm thuế phí)\n⭐Hạng giá vé áp dụng: Bamboo Eco\n🔮Đường bay áp dụng: các đường bay nội địa BAV đang bán trên website TMĐT, trừ đường bay đi và đến Côn Đảo.\n❗Điều kiện áp dụng: Áp dụng theo điều kiện hạng giá vé đã mua\n",
            "coupons": [],
            "domain": "bambooairways.com",
            "end_time": "2021-03-27",
            "id": "5498845288268871151",
            "image": "https://static.accesstrade.vn/adv/img/deal_coupons-09-10-2020-wjbiby.png",
            "link": "https://www.bambooairways.com/vn-vi/thong-tin-dat-ve/uu-dai/mung-ngay-giai-phong-uu-dai-cuc-nong/",
            "merchant": "bambooairways",
            "name": "💥Chương trình “Mừng ngày giải phóng, ưu đãi cực nóng”💥",
            "start_time": "2020-10-09"
        },
        {
            "aff_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https%3A%2F%2Fwww.bambooairways.com%2Fvn-vi%2Fthong-tin-dat-ve%2Fuu-dai%2Fbay-chung-huong-uu-dai-khung%2F",
            "banners": [],
            "categories": [],
            "content": "Tạm biệt năm cũ với những lo lắng, bận rộn của công việc và cuộc sống. Chào năm mới cùng BAY CHUNG để tận hưởng phút giây hạnh phúc, thư giãn bên nhau.\nĐặc biệt nhận ngay ƯU ĐÃI KHỦNG, giảm đến 30% khi mua vé máy bay Bamboo Airways.\n",
            "coupons": [],
            "domain": "bambooairways.com",
            "end_time": "2021-02-11",
            "id": "5562086751721808205",
            "image": "https://static.accesstrade.vn/adv/img/deal_coupons-04-01-2021-c43xzq.png",
            "link": "https://www.bambooairways.com/vn-vi/thong-tin-dat-ve/uu-dai/bay-chung-huong-uu-dai-khung/",
            "merchant": "bambooairways",
            "name": "Chương trình \"Bay chung giảm khủng\"",
            "start_time": "2021-01-04"
        }
    ]
}
```


# Top selling products

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/top_products
```

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:&#x20;

```
https://api.accesstrade.vn/v1/top_products?date_from=01-07-2020&date_to=20-07-2020
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Parameters | Required | Description                         |
| ---------- | -------- | ----------------------------------- |
| date\_from | Optional | Filter begin date, ex: ‘01-04-2016’ |
| date\_to   | Optional | Filter end date, ex: ‘01-01-2019’   |
| merchant   | Optional | Partner, ex: lazada                 |

#### Describe results <a href="#m-t-k-t-qu" id="m-t-k-t-qu"></a>

| Value          | Description                      |
| -------------- | -------------------------------- |
| category\_id   | Id of product category           |
| category\_name | Name of product category         |
| desc           | Description of product           |
| image          | Image of product                 |
| link           | Product link                     |
| aff\_link      | Affiliate link                   |
| price          | Price of product before discount |
| discount       | The amount of discount           |
| total          | Total amount of product          |
| name           | Name of product                  |
| product\_id    | Product ID                       |

#### Example (Use Postman tool to call API) <a href="#v-d-minh-h-a-d-ng-tool-postman-call-api" id="v-d-minh-h-a-d-ng-tool-postman-call-api"></a>

[![top\_products.png](http://docs.accesstrade.vn/publishers/images/topproduct.png)](https://drive.google.com/file/d/1Euarm8ZJhPCZZLzsah2JiFH4eHiedHL3/view?usp=sharing)

RESPONSE

```
{
    "data": [
        {
            "aff_link": "https://go.isclix.com/deep_link/4348611760548105593?url=https%3A%2F%2Ffado.vn%2Fus%2Famazon%2Frazor-turbo-jetts-electric-heel-wheels-red-B076WVGLXS.html%3Fm%3DAGYUU318PHJM6",
            "brand": "",
            "category_id": "",
            "category_name": "Sports & Outdoors",
            "desc": null,
            "discount": 2869795.0,
            "image": "https://images-na.ssl-images-amazon.com/images/I/81259FdCzzL.jpg",
            "link": "https://fado.vn/us/amazon/razor-turbo-jetts-electric-heel-wheels-red-B076WVGLXS.html?m=AGYUU318PHJM6",
            "name": "Razor Turbo Jetts Electric Heel Wheels - Red",
            "price": 2869795.0,
            "product_category": "FADOTREN2000000",
            "product_id": "B076WVGLXS",
            "short_desc": null
        }
    ],
    "total": 1
}
```


# Errors

| Error Code | Meaning                                                               |
| ---------- | --------------------------------------------------------------------- |
| 400        | Bad Request – Your request sucks                                      |
| 401        | Unauthorized – Your API key is wrong                                  |
| 403        | Forbidden – This requested is hidden for administrators only          |
| 404        | Not Found – The specified API could not be found                      |
| 405        | Method Not Allowed – You tried to access a API with an invalid method |


# Get detailed information of the order

**Method: GET**

#### HTTP Request <a href="#http-request" id="http-request"></a>

```
https://api.accesstrade.vn/v1/orders_detail
```

The parameters are passed into HTTP Request according to Key-Value pairs, begin the parameters with the sign “?” and separate the parameters with the sign “&”. Ex:&#x20;

```
https://api.accesstrade.vn/v1/orders_detail?order_id=6357878818&merchant=shopee_kolnew
```

#### Query parameters <a href="#query-parameters" id="query-parameters"></a>

| Parameters | Required | Description                                                                                                  |
| ---------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| order\_id  | Required | Ex: adayroi, lazada.                                                                                         |
| merchant   | Required | Product Id                                                                                                   |
| page       | Optional | Page order. Starting from 1. Default 1                                                                       |
| limit      | Optional | Number of orders returned per page. Default 30. Up to 300 (if you fill in more than 300, default set to 300) |

RESPONSE

```
{
   "data": [
       {
           "_at": {
               "banner_id": 9423,
               "commission_type": 2,
               "goods_id": "4134237966@shopee_kolnew@315000",
               "result_id": 30,
               "reward_type": 2,
               "seq_no": 119491003,
               "vn_click_id": ""
           },
           "_extra": {
               "browser": "Chrome Mobile",
               "device": "Samsung Samsung SM-A325F",
               "device_brand": "Samsung",
               "device_family": "Samsung SM-A325F",
               "device_model": "SM-A325F",
               "device_type": "mobile",
               "os": "Android",
               "parameters": {
                   "at_unique_id": "92LVElMIboqGdgsxHzqRRGnxat",
                   "click_referer": "https://l.instagram.com/",
                   "click_url": "https://shopee.vn/universal-link/xachtayngaphap?utm_campaign=&c=679&af_reengagement_window=7d&af_click_lookback=7d&smtt=0.0.9&utm_content=1ufZrNRf3wCRqyph6SakFtmjVzW2RskU6qZGcqqfozByTbCG-540355-679-IG-&af_siteid=an_17156540000&pid=affiliates&utm_source=an_17156540000&is_retargeting=true&referer=at-kol-new&af_sub_siteid=540355&utm_medium=affiliates&af_viewthrough_lookback=1d&atnct1=ca9c267dad0305d1a6308d2a0cf1c39c&atnct2=1ufZrNRf3wCRqyph6SakFtmjVzW2RskU6qZGcqqfozByTbCG&atnct3=0CEDp00079r00bkxv",
                   "click_user_agent": "Mozilla/5.0 (Linux; Android 11; SM-A325F Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/101.0.4951.61 Mobile Safari/537.36 Instagram 236.0.0.20.109 Android (30/11; 420dpi; 1080x2195; samsung; SM-A325F; a32; mt6769t; vi_VN; 371679877)",
                   "utm_source": "IG",
                   "utm_tool": "deeplink"
               }
           },
           "amount": 284000.0,
           "campaign_id": "679",
           "click_time": "2022-06-01T22:52:01",
           "confirmed_time": "2022-06-02T13:37:47.109000",
           "product_id": "4134237966@shopee_kolnew@315000",
           "product_price": 284000.0,
           "product_quantity": 1,
           "pub_commission": 6816.0,
           "reason_rejected": null,
           "sales_time": "2022-06-01T23:03:40",
           "status": 0
       }
   ],
   "total": 1
}
```


