API Chi tiết chiến dịch

API Chi tiết chiến dịch

Tiền điều kiện:

  1. Đã tạo Ứng dụng trên hệ thống Vbee AICall Cloud (xem cách tạo)

  2. Đã tạo ACCESS_TOKEN (xem cách tạo)

Chi tiết API

Chi tiết chiến dịch

GET https://aicall.vbee.ai/api/v1/public-api/campaigns/:campaign_id

(*) Trường bắt buộc

Parameters

Name
Type
Description

campaign_id

String

Định danh của chiến dịch. Hệ thống sẽ tìm các chiến dịch có id hoặc displayId phù hợp

Headers

Name
Type
Description

Authorization*

String

Bearer <ACCESS_TOKEN>

{
    "result": {
        "id": "6566a9e3a02b3475c0d127ae",
        "campaign_type": "NORMAL",
        "config": {
            "allow_duplicate_phone": false,
            "call_routing": "RANDOM",
            "create_flow": "HAS_EXCEL",
            "current_step": 4,
            "end_date": null,
            "frame_times": [],
            "max_concurrent": 50,
            "max_duration": 150,
            "pool_hotline_id": "647c45128e2d31251ff3be3f",
            "retry": {
                "action_code": {
                    "active": true,
                    "codes": [
                        "WC_CODE_15"
                    ]
                },
                "delay": 5,
                "is_busy": true,
                "is_failed": true,
                "is_no_answer": true,
                "is_voice_mail": false,
                "sub_action_code": {
                    "active": true,
                    "codes": [
                        "WC_CODE_15.1",
                        "WC_CODE_15.2"
                    ]
                },
                "times": 1
            },
            "start_date": "2023-11-28T17:00:00.000Z",
            "use_schedule": true
        },
        "created_at": "2023-11-29T03:02:59.385Z",
        "display_id": "3620",
        "labels": [],
        "name": "Chiến dịch Bot 1",
        "portal_id": "6364d7fb14977c0f5d2d6548",
        "scenario_id": "6566aa62a02b34f19bd127da",
        "status": "FINISH",
        "updated_at": "2023-11-29T09:04:28.246Z"
    },
    "status": 1
}

Nội dung lỗi trả về có thuộc tính status luôn là 0. Ví dụ:

{
  "status": 0,
  "code": 401,
  "message": "Unauthorized"
}

Danh sách mã lỗi

Code
Message
Mô tả

401

Unauthorized

ACCESS_TOKEN không hợp lệ

400

Validation Failed

Các trường đầu vào không hợp lệ

Code mẫu

const axios = require('axios');

const ACCESS_TOKEN = '<ACCESS_TOKEN>';axios({
  method: 'GET',
  url: `https://aicall.vbee.ai/api/v1/public-api/campaigns/6566a9e3a02b3475c0d127ae`,
  headers: {
    Authorization: `Bearer ${accessToken}`,
  },
})
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.log(error);
  })
  .finally(() => {
    // always executed
  });

Last updated