Logo Like3s

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.

ParameterTypeRequiredDescription
keystringYesAPI Key của Partner
actionstringYesGiá 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)

ParameterTypeRequiredDescription
keystringYesAPI Key
actionstringYesGiá trị: "balance"
{
  "balance": 100000,
  "currency": "VND"
}

3. Create Order (action = add)

ParameterTypeRequiredDescription
keystringYesAPI Key
actionstringYes"add"
serviceintegerYesID dịch vụ
linkstringYesLink mục tiêu
quantityintegerYesSố lượng đặt
commentsstringNoNội dung bình luận (nếu dịch vụ hỗ trợ)
minutesintegerNoThờ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.

ParameterTypeRequiredDescription
keystringYesAPI Key
actionstringYes"addBulk"
serviceintegerYesID dịch vụ
linksarrayYesDanh sách link (tối đa 100)
quantityintegerYesSố lượng cho mỗi link
commentsstringNoNội dung bình luận (nếu dịch vụ hỗ trợ)
minutesintegerNoThờ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)

ParameterTypeRequiredDescription
keystringYesAPI Key
actionstringYes"status"
orderintegerYesID đơ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)

ParameterTypeRequiredDescription
keystringYesAPI Key
actionstringYes"orders"
ordersstringYesDanh 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"