Like3s Partner API v2
RESTful API cho đối tác tích hợp hệ thống Like3s. Tất cả request gửi bằng phương thức POST tới endpoint duy nhất.
Overview
Mọi request gửi theo dạng:
POST https://api.like3s.vn/api/v2
Content-Type: application/json
{
"key": "YOUR_API_KEY",
"action": "balance"
}Mọi request bắt buộc phải chứa:
key– API Key của bạn (lấy trong trang cá nhân)action– hành động cần thực hiện
1. Get Services (action = services)
Trả về danh sách dịch vụ khả dụng.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | API Key của Partner |
action | string | Yes | Giá trị cố định: "services" |
Response Example
[
{
"service": 101,
"name": "Like Post Facebook",
"rate": 25000,
"min": 50,
"max": 50000,
"refill": false
}
]rate là giá trên 1.000 đơn vị (VND).
2. Get Balance (action = balance)
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | API Key |
action | string | Yes | Giá trị: "balance" |
{
"balance": 100000,
"currency": "VND"
}3. Create Order (action = add)
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | API Key |
action | string | Yes | "add" |
service | integer | Yes | ID dịch vụ |
link | string | Yes | Link mục tiêu |
quantity | integer | Yes | Số lượng đặt |
comments | string | No | Nội dung bình luận (nếu dịch vụ hỗ trợ) |
minutes | integer | No | Thời gian live (phút, nếu dịch vụ hỗ trợ) |
Response Example
{
"order": 987654
}4. Bulk Order (action = addBulk)
Tạo nhiều đơn cùng lúc với nhiều link, cùng dịch vụ và số lượng.
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | API Key |
action | string | Yes | "addBulk" |
service | integer | Yes | ID dịch vụ |
links | array | Yes | Danh sách link (tối đa 100) |
quantity | integer | Yes | Số lượng cho mỗi link |
comments | string | No | Nội dung bình luận (nếu dịch vụ hỗ trợ) |
minutes | integer | No | Thời gian live (phút, nếu dịch vụ hỗ trợ) |
Request Example
{
"key": "YOUR_API_KEY",
"action": "addBulk",
"service": 1,
"quantity": 500,
"links": [
"https://facebook.com/post/1",
"https://facebook.com/post/2"
]
}Response Example
{
"created": [
{ "order": 101, "link": "https://facebook.com/post/1" }
],
"failed": [
{ "link": "https://facebook.com/post/2", "error": "Link không hợp lệ" }
]
}5. Order Status (action = status)
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | API Key |
action | string | Yes | "status" |
order | integer | Yes | ID đơn hàng |
Response Example
{
"status": "In progress",
"remains": 300,
"start_count": 200,
"charge": 50000,
"currency": "VND"
}Các giá trị của status: Pending · In progress · Completed · Canceled
6. Multiple Order Status (action = orders)
| Parameter | Type | Required | Description |
|---|---|---|---|
key | string | Yes | API Key |
action | string | Yes | "orders" |
orders | string | Yes | Danh sách ID đơn, cách nhau bởi dấu phẩy. VD: "123,456,789" |
Request Example
{
"key": "YOUR_API_KEY",
"action": "orders",
"orders": "12345,67890"
}Response Example
{
"12345": { "status": "Completed", "remains": 0, "start_count": 500, "charge": 25000, "currency": "VND" },
"67890": { "status": "In progress", "remains": 200, "start_count": 100, "charge": 10000, "currency": "VND" },
"99999": { "error": "Không tìm thấy đơn hàng" }
}7. Error Response Format
{
"error": "Error message"
}- API key không hợp lệ
- Action không hợp lệ
- Thiếu thông tin: service, link, quantity là bắt buộc
- Không tìm thấy đơn hàng
- Số dư không đủ
- Định dạng orders không hợp lệ, dùng dạng: "1,2,3"
