Thông tin kết nối API
| API URL | http://demo.tuongtacsale.vn/api/v2 |
| API Key | Chưa đăng nhập |
| HTTP Method | POST |
| Content-Type | application/x-www-form-urlencoded |
| Response | JSON |
Danh sách dịch vụ
| Parameters | Description |
|---|---|
| key | API Key |
| action | "services" |
Example response
[
{
"service": 1,
"name": "Facebook views",
"type": "Default",
"category": "Facebook",
"rate": "2.5",
"min": "200",
"max": "10000",
"refill": true
}, {
"service": 2,
"name": "Tiktok views",
"type": "Default",
"category": "Tiktok",
"rate": "4",
"min": "10",
"max": "1500",
"refill": false
}
]Tạo đơn hàng
| Parameters | Description |
|---|---|
| key | API Key |
| action | "add" |
| service | Service ID |
| link | Url |
| quantity | Needed quantity |
Example response
{
"order": 99999
}Kiểm tra trạng thái đơn hàng
| Parameters | Description |
|---|---|
| key | API Key |
| action | "status" |
| order | Order ID |
Example response
{
"charge": "2.5",
"start_count": "168",
"status": "Completed",
"remains": "-2"
}Status: Pending, Processing, In progress, Completed, Partial, Canceled
Kiểm tra trạng thái nhiều đơn hàng
| Parameters | Description |
|---|---|
| key | API Key |
| action | "status" |
| orders | Order IDs separated by comma (E.g: 123,456,789) |
Example response
{
"123": {
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157"
},
"456": {
"error": "Incorrect order ID"
},
"789": {
"charge": "1.44219",
"start_count": "234",
"status": "In progress",
"remains": "10"
}
}Kiểm tra số dư tài khoản
| Parameters | Description |
|---|---|
| key | API Key |
| action | "balance" |
Example response
{
"balance": "343.22",
"currency": "USD"
}Tạo yêu cầu hoàn lại
| Parameters | Description |
|---|---|
| key | API Key |
| action | "refill" |
| order | Order ID |
Example response
{
"refill": "1"
}Tạo nhiều yêu cầu hoàn lại
| Parameters | Description |
|---|---|
| key | API Key |
| action | "refill" |
| orders | Order IDs separated by comma (E.g: 123,456,789) |
Example response
{
"refill": "1"
}Kiểm tra trạng thái hoàn lại
| Parameters | Description |
|---|---|
| key | API Key |
| action | "refill_status" |
| refill | Refill ID |
Example response
{
"status": "Completed"
}Kiểm tra trạng thái nhiều hoàn lại
| Parameters | Description |
|---|---|
| key | API Key |
| action | "refill_status" |
| refills | Refill IDs separated by comma (E.g: 123,456,789) |
Example response
[
{
"refill": 1,
"status": "Completed"
}, {
"refill": 2,
"status": "Rejected"
}, {
"refill": 3,
"status": {
"error": "Incorrect refill ID"
}
}
]Hủy đơn hàng
| Parameters | Description |
|---|---|
| key | API Key |
| action | "cancel" |
| refills | Order IDs separated by comma (E.g: 123,456,789) |
Example response
[
{
"order": 123,
"cancel": {
"error": "Incorrect order ID"
}
},
{
"order": 456,
"cancel": 1
}
]Lấy danh sách sản phẩm
| Parameters | Description |
|---|---|
| key | API Key |
| action | "list" |
Example response
{
"status": "success",
"data": [
{
"name": "Tài Khoản Capcut Pro Không Giới Hạn Chức Năng Dùng Riêng Biệt",
"desc": "Sử dụng CapCut Pro bạn có thể thực hiện chia sẻ video tiện lợi, dễ dàng lên các nền tảng mạng xã hội như Instagram, Facebook, TikTok,...",
"note": "",
"icon": "http://localhost:5000/upload/productcategory/1764425390361.png",
"options": [
{
"key": "Email",
"value": "email"
},
{
"key": "Số điện thoại",
"value": "phone"
}
],
"products": [
{
"id": "692c5895888604205f6916d7",
"name": "Capcut Pro 1 Tháng 1 Thiết Bị",
"price": 49875,
"ck": 5,
"stock": 205,
"sold": 0,
"min": 1,
"max": 1000000
},
{
"id": "692c5895888604205f6916d8",
"name": "Capcut Pro 1 Năm 3 Thiết Bị",
"price": 210000,
"ck": 0,
"stock": 245,
"sold": 0,
"min": 1,
"max": 1000000
},
]
}
],
"total": 1
}Thêm đơn hàng
| Parameters | Description |
|---|---|
| key | API Key |
| action | "add" |
| product_id | ID sản phẩm (lấy ở trong products khi get list) |
| quantity | Số lượng |
| options | Options (nếu có lấy ở trong options khi get list){
'key': 'value',
'key2': 'value2',
} |
Example response
{
"status": "success",
"msg": "Đơn hàng đã được tạo thành công",
"order": "064321"
}Lấy thông tin đơn hàng
| Parameters | Description |
|---|---|
| key | API Key |
| action | "get_order" |
| order | ID đơn hàng |
Example response
{
"status": "success",
"trans_id": "121817",
"product_name": "Tài khoản 1 ngày",
"quantity": 4,
"price": 20000,
"order_status": "Completed",
"accounts": [
"ccccc|cccc",
"ccccc|cccc",
"ccccc|cccc",
"ccccc|cccc"
]
}Lấy thông tin nhiều đơn hàng
| Parameters | Description |
|---|---|
| key | API Key |
| action | "get_order" |
| orders | ID đơn hàng separated by comma (E.g: 123,456,789) |
Example response
{
"121817": {
"status": "success",
"trans_id": "121817",
"product_name": "Tài khoản 1 ngày",
"quantity": 4,
"price": 20000,
"order_status": "Completed",
"accounts": [
"ccccc|cccc",
"ccccc|cccc",
"ccccc|cccc",
"ccccc|cccc"
]
},
"064321": {
"status": "success",
"trans_id": "064321",
"product_name": "Tài khoản 1 ngày",
"quantity": 1,
"price": 5000,
"order_status": "Completed",
"accounts": [
"ccccc|cccc"
]
}
}