AUTOBUFF · REST API

API cho nhà phát triển

Tra cứu danh mục và quản lý đơn hàng từ máy chủ của bạn.

Quản lý khóa API

Xác thực

Tạo khóa trong Tài khoản → Tích hợp API, rồi gửi khóa từ máy chủ của bạn qua header X-API-Key. Danh mục có thể đọc công khai.

X-API-Key: YOUR_API_KEY

Nền tảng

GET/platform

Lấy _id nền tảng để tra danh mục.

Yêu cầu
curl -X GET "https://api.autobuff.vn/platform"

Danh mục theo nền tảng

GET/category/by-platform/{platformId}

Lấy _id danh mục để tra gói.

Yêu cầu
curl -X GET "https://api.autobuff.vn/category/by-platform/{platformId}"

Danh sách dịch vụ

GET/service/by-category/{categoryId}

Dùng serviceId khi đặt đơn. unitPriceVnd và minimumTotalVnd tính bằng VND.

Yêu cầu
curl -X GET "https://api.autobuff.vn/service/by-category/{categoryId}"

Giá từ theo danh mục

GET/service/public-prices

Đọc data.groups để lấy giá từ và số lượng tối thiểu.

Yêu cầu
curl -X GET "https://api.autobuff.vn/service/public-prices"

Xem số dư

GET/user

Đọc data.balance để lấy số dư VND.

Yêu cầu
curl -X GET "https://api.autobuff.vn/user" \
  -H "X-API-Key: YOUR_API_KEY"
Phản hồi minh họa
{
  "message": "Success",
  "data": {
    "balance": 250000
  }
}

Tạo đơn

POST/order

Dùng mã gói, liên kết và số lượng hợp lệ. Yêu cầu thành công sử dụng số dư tài khoản.

Yêu cầu
curl -X POST "https://api.autobuff.vn/order" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"serviceId":123,"objectId":"https://example.com/post","quantity":100}'
Phản hồi minh họa
{
  "message": "Success",
  "data": {
    "orderNumber": "YOUR_ORDER_NUMBER",
    "status": "PENDING",
    "quantity": 100
  }
}

Tra cứu đơn

GET/order?page=1&take=20

Đọc data.data để lấy danh sách. Thêm search để tìm theo mã đơn hàng.

Yêu cầu
curl -X GET "https://api.autobuff.vn/order?page=1&take=20" \
  -H "X-API-Key: YOUR_API_KEY"