# Campaign Graph Statistics (deprecated)

Retrieve information on Open, Click, Spam and / or Unsubscribe events for selected campaigns, evolving overtime with intervals of 15 or 30 minutes. At least one of the event query parameters (Click, Open, Spam, Unsub) needs to be set to true.

> Note: This is a legacy endpoint. We advise using /statcounters to retrieve event evolution stats.

Endpoint: GET /v3/REST/campaigngraphstatistics
Version: 1.0.0
Security: basicAuth

## Query parameters:

  - `Click` (boolean)
    When true, will retrieve the number of clicked messages in ClickedCount. Otherwise the click count is not calculated and a -1 value is returned instead.

Default value: false

> Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

  - `IDS` (string, required)
    Retrieves only statistics for the specified campaign IDs. Multiple IDs can be separated with a comma.
    Example: "1,2,3"

  - `Open` (boolean)
    When true, will retrieve the number of opened messages in OpenedCount. Otherwise the open count is not calculated and a -1 value is returned instead.

Default value: false

> Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.
    Example: true

  - `Range` (string)
    Selects a period of time since the start of the campaign, for which you want to retrieve evolution statistics. If you select 24h (24 hours), the stat intervals will be 15 minutes long. If 7d (7 days) is selected, the intervals will be 30 minutes long.

  - `Spam` (boolean)
    When true, will retrieve the number of messages marked as spam in SpamCount. Otherwise the spam count is not calculated and a -1 value is returned instead.

Default value: false

> Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

  - `Unsub` (boolean)
    When true, will retrieve the number of unsubscribe events in UnsubCount. Otherwise the unsubscribe count is not calculated and a -1 value is returned instead.

Default value: false

> Note: At least one of the Open, Click, Unsub or Spam query parameters must be set to true.

## Response 200 fields (application/json):

  - `Count` (integer)
    Indicates the number of objects in the Data array.

  - `Data` (array)
    A JSON array containing a list of objects returned by this endpoint.

  - `Data.Clickcount` (integer)
    Number of clicked messages for this time interval. The proper count is returned if the Click parameter is set as true. Otherwise the click count will not be calculated and a -1 value will be returned instead.

  - `Data.ID` (integer)
    Unique numeric ID for the campaign.

  - `Data.Opencount` (integer)
    Number of opened messages for this time interval. The proper count is returned if the Open parameter is set as true. Otherwise the open count will not be calculated and a -1 value will be returned instead.

  - `Data.Spamcount` (integer)
    Number of messages marked as spam for this time interval. The proper count is returned if the Spam parameter is set as true. Otherwise will the spam count will not be calculated and a -1 value will be returned instead.

  - `Data.Tick` (integer)
    The time lapsed since the start of the campaigns, in seconds.

  - `Data.Unsubcount` (integer)
    Number of unsubscribe events for this time interval. The proper count is returned if the Unsub parameter is set as true. Otherwise will the unsubscribe count will not be calculated and a -1 value will be returned instead.

  - `Total` (integer)


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields

## Response 429 fields

## Response 500 fields
