取得會員分析圖表

Get client statistics

post

Retrieve time-series client statistics data with date and count information.

Default time range: Last 7 days if startTime and endTime are not provided

Platform filtering:

  • If platform is not specified, returns data for all platforms

  • If platform is specified, returns data only for that platform

Supported platforms: line, facebook, instagram, liveChat, whatsapp

Response format: Arrays of objects with date and count properties

Authorizations
Query parameters
botIdstringRequired

The bot ID for the API request

Body
secretstringRequired

Secret key for API authentication

Example: your_secret_key_here
platformstring · enumOptional

Platform type for filtering (optional, if not provided returns all platforms)

Example: linePossible values:
startTimestring · dateOptional

Start date for statistics range (optional, defaults to 7 days ago if not provided)

Example: 2025-01-01
endTimestring · dateOptional

End date for statistics range (optional, defaults to today if not provided)

Example: 2025-01-07
typestring · enumRequired

Statistics type

Default: followerExample: followerPossible values:
Responses
200
Client statistics data retrieved successfully
application/json
post
POST /api/openapi/clients/statistics HTTP/1.1
Host: mantago.cc
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 117

{
  "secret": "your_secret_key_here",
  "platform": "line",
  "startTime": "2025-01-01",
  "endTime": "2025-01-07",
  "type": "follower"
}
{
  "success": true,
  "message": "Get client statistics successfully",
  "clientStatistics": {
    "lineFollowers": [
      {
        "date": "2025-01-10",
        "count": 1250
      },
      {
        "date": "2025-01-11",
        "count": 1255
      },
      {
        "date": "2025-01-12",
        "count": 1260
      }
    ],
    "fbFollowers": [
      {
        "date": "2025-01-10",
        "count": 920
      },
      {
        "date": "2025-01-11",
        "count": 925
      },
      {
        "date": "2025-01-12",
        "count": 930
      }
    ],
    "igFollowers": [
      {
        "date": "2025-01-10",
        "count": 1100
      },
      {
        "date": "2025-01-11",
        "count": 1110
      },
      {
        "date": "2025-01-12",
        "count": 1115
      }
    ],
    "liveChatFollowers": [
      {
        "date": "2025-01-10",
        "count": 180
      },
      {
        "date": "2025-01-11",
        "count": 182
      },
      {
        "date": "2025-01-12",
        "count": 185
      }
    ],
    "whatsappFollowers": [
      {
        "date": "2025-01-10",
        "count": 450
      },
      {
        "date": "2025-01-11",
        "count": 455
      },
      {
        "date": "2025-01-12",
        "count": 460
      }
    ],
    "totalFollowers": [
      {
        "date": "2025-01-10",
        "count": 3900
      },
      {
        "date": "2025-01-11",
        "count": 3927
      },
      {
        "date": "2025-01-12",
        "count": 3950
      }
    ]
  }
}

Last updated