DEVELOPER HUB

Tích hợp hệ sinh thái Osiner vào ứng dụng của bạn bằng bộ API mạnh mẽ, chuyên nghiệp và sẵn sàng cho việc tự động hóa.

🚀 Bắt đầu nhanh với Postman

Bạn có thể dễ dàng test toàn bộ hệ sinh thái Osiner bằng cách sử dụng file Collection chúng tôi cung cấp:

  1. 1 Tải file JSON bằng nút phía trên.
  2. 2 Mở Postman và chọn Import > Files, sau đó chọn file vừa tải.
  3. 3 Thiết lập biến môi trường base_url thành http://tools.sinh.
  4. 4 Điền token nhận được từ trang Dashboard của bạn.

07. Mã lỗi & Trạng thái (Error Handling)

HTTP Status Codes

  • 200 / 201 Thành công / Đã tạo
  • 401 Token không hợp lệ / Hết hạn
  • 403 Không có quyền truy cập
  • 404 Không tìm thấy tài nguyên
  • 422 Lỗi Validation / Trùng lặp dữ liệu

Ví dụ Response Lỗi

// 422 Unprocessable Content
{
  "success": false,
  "message": "The name field is required.",
  "errors": { 
    "name": ["The name field is required."] 
  }
}
// 401 Unauthorized
{
  "message": "Unauthenticated."
}

01. Xác thực (Authentication)

Tất cả các API này đều yêu cầu Header xác thực Sanctum:

// Yêu cầu bắt buộc

Authorization: Bearer your_api_token_here

Accept: application/json

02. QUẢN LÝ ỨNG DỤNG

GET

/api/developer/apps

Lấy danh sách tất cả các ứng dụng bạn đang quản lý.

// Success Response (Beautified)
{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Check Zalo",
      "slug": "check-zalo",
      "usage_logs_count": 52
    }
  ]
}
GET

/api/developer/apps/{id}

Lấy chi tiết một ứng dụng (theo ID hoặc Slug).

// Success Response
{
  "success": true,
  "data": {
    "id": 1,
    "name": "Check Zalo",
    "plans": [
      { "id": 10, "name": "Basic", "price": 0 },
      { "id": 11, "name": "Pro", "price": 150000 }
    ],
    "usage_logs_count": 52
  }
}
POST

/api/developer/apps

Tạo ứng dụng mới với đầy đủ thông tin chi tiết (Hỗ trợ cả JSON và multipart/form-data để upload file).

Để upload file trực tiếp, hãy sử dụng multipart/form-data và gửi các field: icon, logo, backend_logo, setup_icon, screenshots[].
Request JSON (Full)
{
  "name": "Super Tool V2",
  "protocol": "super-tool",
  "author": "Osiner Dev",
  "description": "Mô tả ngắn gọn",
  "introduction": "Giới thiệu chi tiết về công cụ...",
  "seo_content": "Nội dung SEO cho trang landing",
  "zalo_support_url": "https://zalo.me/g/abc",
  "download_url": "https://osiner.com/download/tool.exe",
  "version": "1.0.0",
  "changelog": "- First release\n- Added AI features",
  "svg_icon": "<svg...></svg>",
  "logo_url": "https://cdn.osiner.com/logo.png",
  "icon_url": "https://cdn.osiner.com/icon.png",
  "commission_rate": 70.0,
  "notification_text": "Cập nhật quan trọng",
  "notification_active": true,
  "is_update_required": false
}
Response Success
{
  "success": true,
  "data": {
    "id": 105,
    "slug": "super-tool-v2",
    "name": "Super Tool V2",
    "protocol": "super-tool",
    "is_active": true,
    ...
  }
}
PUT

/api/developer/apps/{id}

Lưu ý: Khi upload file bằng multipart/form-data cho phương thức PUT, bạn nên sử dụng POST và thêm field _method=PUT.
// Request JSON (Exhaustive)
{
  "version": "1.0.1",
  "changelog": "- Fixed bugs",
  "notification_text": "Cập nhật mới!",
  "notification_active": true,
  "is_update_required": true,
  "introduction": "Mô tả mới...",
  "icon_url": "https://..."
}
DELETE

/api/developer/apps/{id}

// Response Success
{
  "success": true,
  "message": "App deleted successfully"
}

06. QUẢN LÝ GÓI CƯỚC (PLANS)

GET

/api/developer/plans

Lấy toàn bộ danh sách gói cước của bạn.

// Success Response
{
  "success": true,
  "data": [
    {
      "id": 10,
      "app_id": 1,
      "name": "Basic",
      "price": 0
    },
    {
      "id": 11,
      "app_id": 1,
      "name": "Pro",
      "price": 150000
    }
  ]
}
GET

/api/developer/plans/{id}

Lấy chi tiết một gói cước kèm các tính năng (Features).

// Success Response
{
  "success": true,
  "data": {
    "id": 11,
    "name": "Pro",
    "price": 150000,
    "features": [
      { "key": "max_accounts", "value": 3, "label": "Tài khoản" },
      { "key": "priority_support", "value": true, "label": "Hỗ trợ" }
    ]
  }
}
POST

/api/developer/plans

Tạo mới một gói cước cho ứng dụng.

Request JSON
{
  "app_id": 1,
  "name": "Premium",
  "price": 50000
}
Response Success
{
  "success": true,
  "data": {
    "id": 100,
    "name": "Premium",
    ...
  }
}
PUT

/api/developer/plans/{id}

// Request JSON
{
  "name": "Pro VIP",
  "price": 150000
}
DELETE

/api/developer/plans/{id}

// Response Success
{
  "success": true,
  "message": "Plan deleted successfully"
}

07. QUẢN LÝ CÂU HỎI (FAQs)

Tự động cấu hình danh sách câu hỏi thường gặp cho Tool của bạn.

GET

/api/developer/apps/{id}/faqs

// Response Success
{
  "success": true,
  "data": [
    {
      "id": 1,
      "question": "Làm thế nào để bắt đầu?",
      "answer": "Bạn có thể tải tool và làm theo hướng dẫn...",
      "order_index": 0
    }
  ]
}
POST

/api/developer/apps/{id}/faqs

// Request Body
{
  "question": "Tôi cần hỗ trợ ở đâu?",
  "answer": "Hãy join group Zalo này...",
  "order_index": 1,
  "is_active": true
}

08. GIÁM SÁT & PHÂN TÍCH (ANALYTICS)

Theo dõi doanh thu và lượt sử dụng ứng dụng thời gian thực.

GET

Usage Logs

// Success Response
{
  "success": true,
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 500,
        "user_id": 10,
        "action": "check_zalo",
        "details": "Checking 09...88",
        "created_at": "2024-03-28..."
      }
    ]
  }
}
GET

Revenue Shares

// Success Response
{
  "success": true,
  "data": {
    "data": [
      {
        "id": 1,
        "amount": 105000,
        "commission": 70.0,
        "net_amount": 73500,
        "created_at": "2024-03-28..."
      }
    ]
  }
}
GET

App Statistics

// Aggregated Stats
{
  "success": true,
  "data": {
    "summary": { "total_revenue": 1050000, "today_revenue": 150000, "active_subscriptions": 12 },
    "trends": { "revenue": [{ "date": "2024-03-28", "total": 150000 }], "usage": [...] }
  }
}

Cần hỗ trợ tích hợp sâu hơn? Liên hệ trực tiếp với bộ phận kỹ thuật Osiner.

Website
Group Zalo
Cộng đồng Facebook