# Get campaign group reporting

GET https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/{campaignGroupId}

Retrieve reporting metrics for a specific LinkedIn campaign group

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `adPublishing.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `campaignGroupId` | string | Yes | Campaign group identifier |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `locationId` | string | Yes | Location ID |
| `startDate` | string | Yes | Start date in yyyy-mm-dd format |
| `endDate` | string | Yes | End date in yyyy-mm-dd format |
| `fields` | array | No | Reporting fields. Pass as comma-separated values on the wire (e.g. ?fields=impressions,clicks). |
| `campaignGroupId` | string | No | Campaign group ID |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "HighLevel API",
    "version": "2021-04-15"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/ad-publishing/linkedin/reporting/campaign-group/{campaignGroupId}": {
      "get": {
        "summary": "Get campaign group reporting",
        "operationId": "getCampaignGroupReporting",
        "description": "Retrieve reporting metrics for a specific LinkedIn campaign group",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2021-04-15"
              ]
            }
          },
          {
            "name": "campaignGroupId",
            "required": true,
            "in": "path",
            "description": "Campaign group identifier",
            "schema": {
              "example": "12345678",
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "query",
            "description": "Location ID",
            "schema": {
              "example": "loc_abc123",
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "required": true,
            "in": "query",
            "description": "Start date in yyyy-mm-dd format",
            "schema": {
              "example": "2024-01-01",
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "required": true,
            "in": "query",
            "description": "End date in yyyy-mm-dd format",
            "schema": {
              "example": "2024-01-31",
              "type": "string"
            }
          },
          {
            "name": "fields",
            "required": false,
            "in": "query",
            "description": "Reporting fields. Pass as comma-separated values on the wire (e.g. ?fields=impressions,clicks).",
            "schema": {
              "example": [
                "impressions",
                "clicks"
              ],
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "clicks",
                  "oneClickLeads",
                  "costInLocalCurrency",
                  "impressions",
                  "costInUsd",
                  "ctr",
                  "cpc",
                  "cpm",
                  "cpl",
                  "externalWebsitePostClickConversions",
                  "conversionRate"
                ]
              }
            }
          },
          {
            "name": "campaignGroupId",
            "required": false,
            "in": "query",
            "description": "Campaign group ID",
            "schema": {
              "example": "87654321",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Metrics for the campaign group over the period, merged with the stored campaign group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedInCampaignGroupReportingDTO"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InternalServerErrorDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": [
              "adPublishing.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "LinkedInCampaignGroupReportingDTO": {
        "type": "object",
        "properties": {
          "impressions": {
            "type": "number",
            "description": "Impressions",
            "example": 15230
          },
          "clicks": {
            "type": "number",
            "description": "Clicks",
            "example": 214
          },
          "oneClickLeads": {
            "type": "number",
            "description": "Leads captured through a one-click lead form",
            "example": 8
          },
          "externalWebsitePostClickConversions": {
            "type": "number",
            "description": "Conversions recorded on an external site after a click",
            "example": 6
          },
          "ctr": {
            "type": "number",
            "description": "Click-through rate as a percentage, e.g. 1.40 means 1.40%. Null when it cannot be computed.",
            "example": 1.4,
            "nullable": true
          },
          "cpc": {
            "type": "number",
            "description": "Cost per click in the account currency. Null when it cannot be computed.",
            "example": 0.66,
            "nullable": true
          },
          "cpm": {
            "type": "number",
            "description": "Cost per thousand impressions. Null when it cannot be computed.",
            "example": 9.35,
            "nullable": true
          },
          "cpl": {
            "type": "number",
            "description": "Cost per lead. Null when it cannot be computed.",
            "example": 17.79,
            "nullable": true
          },
          "conversionRate": {
            "type": "number",
            "description": "Conversion rate as a percentage. Null when it cannot be computed.",
            "example": 3.74,
            "nullable": true
          },
          "pivotValues": {
            "description": "URNs of the entity this row is pivoted on — a sponsored account, campaign group or creative depending on the request. This is not the time bucket; that is carried by `dateStart`/`dateEnd`.",
            "example": [
              "urn:li:sponsoredAccount:509444880"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "dateStart": {
            "type": "string",
            "description": "First day covered by the row",
            "example": "2026-07-01"
          },
          "dateEnd": {
            "type": "string",
            "description": "Last day covered by the row",
            "example": "2026-07-31"
          },
          "costInUsd": {
            "type": "string",
            "description": "Spend in USD. Returned as a **string** on grouped rows, unlike in `totals`, and at full source precision — e.g. `899.99999999999988713`. Parse as a decimal rather than a float.",
            "example": "576.049999999999648674"
          },
          "costInLocalCurrency": {
            "type": "string",
            "description": "Spend in the account currency. Returned as a **string** on grouped rows, unlike in `totals`, and at full source precision. Parse as a decimal rather than a float.",
            "example": "576.05000000000014868"
          },
          "_id": {
            "type": "string",
            "description": "Campaign group record id, as `_id` rather than `id`",
            "example": "693c9998ce9aa51d56fa2c7a"
          },
          "__v": {
            "type": "number",
            "description": "Mongoose internal version key",
            "example": 0
          },
          "name": {
            "type": "string",
            "description": "Campaign group name",
            "example": "Q3 demand generation"
          },
          "locationId": {
            "type": "string",
            "description": "Location identifier",
            "example": "ASYI07d4Xt8ifUCwVZyT"
          },
          "linkedInAdAccountId": {
            "type": "string",
            "description": "LinkedIn ad account id",
            "example": "509444880"
          },
          "publishingStatus": {
            "type": "string",
            "description": "Publishing status",
            "example": "PAUSED"
          },
          "objectiveType": {
            "type": "string",
            "description": "Campaign objective",
            "enum": [
              "LEAD_GENERATION",
              "WEBSITE_VISIT"
            ],
            "example": "LEAD_GENERATION"
          },
          "adBudgetOptimization": {
            "type": "string",
            "description": "Budget optimisation mode",
            "enum": [
              "MAXIMUM_DELIVERY",
              "COST_CAP"
            ],
            "example": "MAXIMUM_DELIVERY"
          },
          "budget": {
            "description": "Budget configuration",
            "example": {
              "budgetType": "DAILY",
              "amount": 30,
              "scheduleStartDate": "2026-08-18T07:40:10.110Z",
              "scheduleEndDate": "2026-09-17T07:40:10.110Z"
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "budgetType": {
                    "type": "string",
                    "description": "Budget cadence",
                    "enum": [
                      "DAILY",
                      "LIFETIME"
                    ],
                    "example": "DAILY"
                  },
                  "amount": {
                    "type": "number",
                    "description": "Budget amount in the account currency",
                    "example": 30
                  },
                  "scheduleStartDate": {
                    "type": "string",
                    "description": "Schedule start",
                    "example": "2026-08-18T07:40:10.110Z"
                  },
                  "scheduleEndDate": {
                    "type": "string",
                    "description": "Schedule end",
                    "example": "2026-09-17T07:40:10.110Z"
                  }
                },
                "required": [
                  "budgetType",
                  "amount"
                ],
                "title": "LinkedInBudgetDTO"
              }
            ]
          },
          "adCampaignGroupId": {
            "type": "string",
            "description": "LinkedIn campaign group id, set once published",
            "example": "807183436"
          },
          "linkedInError": {
            "type": "string",
            "description": "Publish or review error. Empty string when there is none.",
            "example": ""
          },
          "createdAt": {
            "type": "string",
            "description": "Created at",
            "example": "2025-12-12T22:39:20.263Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Updated at",
            "example": "2026-01-12T15:13:52.592Z"
          }
        },
        "required": [
          "pivotValues",
          "dateStart",
          "dateEnd",
          "_id",
          "__v",
          "name",
          "locationId",
          "linkedInAdAccountId",
          "publishingStatus",
          "objectiveType",
          "budget",
          "linkedInError",
          "createdAt",
          "updatedAt"
        ],
        "title": "LinkedInCampaignGroupReportingDTO"
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      },
      "InternalServerErrorDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "description": "HTTP status code for an unexpected server error",
            "example": 500
          },
          "message": {
            "type": "string",
            "description": "Error message describing the server failure",
            "example": "Internal Server Error"
          }
        },
        "title": "InternalServerErrorDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X GET 'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/<campaignGroupId>?locationId=<LOCATIONID>&startDate=<STARTDATE>&endDate=<ENDDATE>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: 2021-04-15'
```

**Node.js**

```javascript
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: '2021-04-15'
  }
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/<campaignGroupId>?locationId=<LOCATIONID>&startDate=<STARTDATE>&endDate=<ENDDATE>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/{campaignGroupId}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "2021-04-15"
}

params = {
    "locationId": "<LOCATIONID>",
    "startDate": "<STARTDATE>",
    "endDate": "<ENDDATE>"
}

response = requests.get(url, params=params, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/<campaignGroupId>?locationId=<LOCATIONID>&startDate=<STARTDATE>&endDate=<ENDDATE>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: 2021-04-15',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .get("https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/<campaignGroupId>?locationId=<LOCATIONID>&startDate=<STARTDATE>&endDate=<ENDDATE>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "2021-04-15")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {
  url := "https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/<campaignGroupId>?locationId=<LOCATIONID>&startDate=<STARTDATE>&endDate=<ENDDATE>"
  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "2021-04-15")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/<campaignGroupId>?locationId=<LOCATIONID>&startDate=<STARTDATE>&endDate=<ENDDATE>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "2021-04-15"

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "2021-04-15"
}

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/ad-publishing/linkedin/reporting/campaign-group/<campaignGroupId>?locationId=<LOCATIONID>&startDate=<STARTDATE>&endDate=<ENDDATE>' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
```
