Retrieve campaign stats

    Retrieve campaign stats


    Article summary

    Get
    /v2/{accessKey}/campaign/stats

    Retrieving the statistics of campaigns within a specific date range. The maximum period is one week.

    Header parameters
    Authorization
    stringRequired

    Authorization: Bearer

    Path parameters
    accessKey
    stringRequired

    Customer access key

    Query parameters
    from
    stringRequired

    Retrieve stats between FROM and TO date range. (format: YYYY-MM-DD'T'HH:mm:ss'Z', e.g. 2024-09-07T00:00:00Z)

    to
    stringRequired

    Retrieve stats between FROM and TO date range. (format: YYYY-MM-DD'T'HH:mm:ss'Z', e.g. 2024-09-07T00:00:00Z)

    campaignKeys
    string

    Specific campaign keys, separated by commas, to retrieve statistics between the FROM and TO date range.

    Responses
    200

    200

    Result
    "{\n    \"results\": [{\n        \"campaignId\" : \"1234\",\n        \"campaignKey\" : \"1234fef8e8e3\",\n        \"accessKey\" : \"a1b2c3d4\",\n        \"title\" : \"test campaign\",\n        \"scheduledAt\" : \"2022-07-08T06:30:00Z\",\n        \"startedAt\" : \"2022-07-08T06:21:06Z\",\n        \"endedAt\" : \"2022-07-11T12:38:59Z\",\n        \"totalViewers\" : 123456,\n        \"totalLoginViewers\" : 100000,\n        \"peakConcurrentViewers\" : 12345,\n        \"newLoginViewers\" : 123455,\n        \"averageViewingTime\" : 15,\n        \"totalViewingTime\" : 1851840,\n        \"likes\" : 123456,\n        \"likeViewers\" : 123456,\n        \"averageLikes\" : 1,\n        \"chats\" : 123456,\n        \"chatViewers\" : 123456,\n        \"averageChats\" : 1.0,\n        \"productClicks\" : 123456,\n        \"productClickViewers\" : 123456,\n        \"averageProductClicks\" : 1.0,\n        \"bannerClicks\" : 123456\n    }]\n}\n"
    object
    campaignId
    string
    Example1234
    campaignKey
    string
    Example1234fef8e8e3
    accessKey
    string
    Examplea1b2c3d4
    title
    string
    Exampletest campaign
    scheduledAt
    string
    Example2022-07-08T06:30:00Z
    startedAt
    string
    Example2022-07-08T06:21:06Z
    endedAt
    string
    Example2022-07-11T12:38:59Z
    totalViewers
    integer
    Default0
    Example123456
    totalLoginViewers
    integer
    Default0
    Example100000
    peakConcurrentViewers
    integer
    Default0
    Example12345
    newLoginViewers
    integer
    Default0
    Example123455
    averageViewingTime
    integer
    Default0
    Example15
    totalViewingTime
    integer
    Default0
    Example1851840
    likes
    integer
    Default0
    Example123456
    likeViewers
    integer
    Default0
    Example123456
    averageLikes
    integer
    Default0
    Example1
    chats
    integer
    Default0
    Example123456
    chatViewers
    integer
    Default0
    Example123456
    averageChats
    integer
    Default0
    Example1
    productClicks
    integer
    Default0
    Example123456
    productClickViewers
    integer
    Default0
    Example123456
    averageProductClicks
    integer
    Default0
    Example1
    bannerClicks
    integer
    Default0
    Example123456
    4XX

    4XX

    Result
    "{}"
    object