# Get ad campaign group

GET https://services.leadconnectorhq.com/ad-publishing/linkedin/ads/{adId}

Retrieve a LinkedIn ad campaign group by ID

## 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 |
|------|------|----------|-------------|
| `adId` | string | Yes | Ad identifier |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `locationId` | string | Yes | Location identifier |

## 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/ads/{adId}": {
      "get": {
        "summary": "Get ad campaign group",
        "operationId": "getAdCampaignGroup",
        "description": "Retrieve a LinkedIn ad campaign group by ID",
        "parameters": [
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "2021-04-15"
              ]
            }
          },
          {
            "name": "adId",
            "required": true,
            "in": "path",
            "description": "Ad identifier",
            "schema": {
              "example": "507f1f77bcf86cd799439011",
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "query",
            "description": "Location identifier",
            "schema": {
              "example": "HChooFuiyPpVYzeJ4HMe",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The campaign group with its ad campaigns and their ads",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedInCampaignGroupDTO"
                }
              }
            }
          },
          "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": {
      "LinkedInCampaignGroupDTO": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Campaign group identifier",
            "example": "6a840c5a1c2e6acf77b1d258"
          },
          "name": {
            "type": "string",
            "description": "Campaign group name",
            "example": "Q3 demand generation"
          },
          "locationId": {
            "type": "string",
            "description": "Location identifier",
            "example": "fRMewNQIxSyZ5R4nQyit"
          },
          "linkedInAdAccountId": {
            "type": "string",
            "description": "LinkedIn ad account id the group belongs to",
            "example": "556129919"
          },
          "adCampaignGroupId": {
            "type": "string",
            "description": "LinkedIn campaign group id, set once published",
            "example": "1192521246"
          },
          "publishingStatus": {
            "type": "string",
            "description": "Publishing status",
            "example": "PAUSED"
          },
          "linkedInError": {
            "type": "string",
            "description": "Publish or review error from LinkedIn. Empty string when there is none.",
            "example": ""
          },
          "objectiveType": {
            "type": "string",
            "description": "Campaign objective",
            "enum": [
              "LEAD_GENERATION",
              "WEBSITE_VISIT"
            ],
            "example": "WEBSITE_VISIT"
          },
          "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"
              }
            ]
          },
          "adCampaigns": {
            "description": "Ad campaigns with their ads",
            "example": [
              {
                "id": "6a840c7b1c2e6acf77b1d2a5",
                "name": "Ad set 1",
                "adCampaignGroupId": "6a840c5a1c2e6acf77b1d258",
                "adCampaignId": "869320926",
                "publishingStatus": "PAUSED",
                "linkedInError": "",
                "campaignType": "SPONSORED_UPDATES",
                "mediaType": "STANDARD_UPDATE",
                "locale": {
                  "country": "US",
                  "language": "en"
                },
                "unitCost": {
                  "amount": 1
                },
                "audience": {
                  "geoLocations": [
                    {
                      "name": "Mumbai, Maharashtra, India",
                      "urn": "urn:li:geo:106164952",
                      "facetUrn": "urn:li:adTargetingFacet:locations",
                      "selectionType": "include"
                    }
                  ],
                  "targetAudience": {
                    "include": [
                      {
                        "facet": "urn:li:adTargetingFacet:locations",
                        "values": [
                          "urn:li:geo:106164952"
                        ]
                      }
                    ],
                    "exclude": [
                      {
                        "facet": "urn:li:adTargetingFacet:staffCountRanges",
                        "values": [
                          "urn:li:staffCountRange:SIZE_1"
                        ]
                      }
                    ]
                  }
                },
                "ads": [
                  {
                    "id": "6a840c7b1c2e6acf77b1d2a8",
                    "name": "Ad 1",
                    "adCampaignId": "6a840c7b1c2e6acf77b1d2a5",
                    "adCampaignGroupId": "6a840c5a1c2e6acf77b1d258",
                    "adId": "1554451156",
                    "publishingStatus": "FAILED",
                    "linkedInError": "",
                    "introductoryText": "Grow your pipeline this quarter",
                    "description": "",
                    "destinationUrl": "https://example.com",
                    "destinationFormId": "",
                    "callToActionLabel": "APPLY",
                    "contentReferenceString": "urn:li:share:7495384246371512320",
                    "media": [
                      {
                        "type": "image",
                        "src": "https://staging.files.leadconnectorhq.com/file/abc/def.png",
                        "name": "creative.png",
                        "headline": "Try it free",
                        "destinationUrl": "example.com",
                        "fileSizeBytes": 1066210,
                        "urn": "urn:li:image:D5610AQEjSUtmzK0rjw",
                        "_id": "6a840c881c2e6acf77b1d3c9"
                      }
                    ],
                    "createdAt": "2026-08-18T07:40:43.385Z",
                    "updatedAt": "2026-08-18T07:45:04.624Z"
                  }
                ],
                "createdAt": "2026-08-18T07:40:43.369Z",
                "updatedAt": "2026-08-18T07:45:04.746Z"
              }
            ],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Ad campaign identifier",
                  "example": "6a840c7b1c2e6acf77b1d2a5"
                },
                "name": {
                  "type": "string",
                  "description": "Ad campaign name",
                  "example": "Ad set 1"
                },
                "adCampaignGroupId": {
                  "type": "string",
                  "description": "Parent campaign group id",
                  "example": "6a840c5a1c2e6acf77b1d258"
                },
                "adCampaignId": {
                  "type": "string",
                  "description": "LinkedIn campaign id, set once published",
                  "example": "869320926"
                },
                "publishingStatus": {
                  "type": "string",
                  "description": "Publishing status",
                  "example": "PAUSED"
                },
                "linkedInError": {
                  "type": "string",
                  "description": "Publish error from LinkedIn. Empty string when there is none.",
                  "example": ""
                },
                "campaignType": {
                  "type": "string",
                  "description": "Campaign type",
                  "enum": [
                    "SPONSORED_UPDATES"
                  ],
                  "example": "SPONSORED_UPDATES"
                },
                "mediaType": {
                  "type": "string",
                  "description": "Creative format",
                  "enum": [
                    "STANDARD_UPDATE",
                    "CAROUSEL",
                    "SINGLE_VIDEO"
                  ],
                  "example": "STANDARD_UPDATE"
                },
                "locale": {
                  "description": "Campaign locale",
                  "example": {
                    "country": "US",
                    "language": "en"
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "country": {
                          "type": "string",
                          "description": "Two-letter country code",
                          "example": "US"
                        },
                        "language": {
                          "type": "string",
                          "description": "Two-letter language code",
                          "example": "en"
                        }
                      },
                      "required": [
                        "country",
                        "language"
                      ],
                      "title": "LinkedInLocaleDTO"
                    }
                  ]
                },
                "unitCost": {
                  "description": "Bid configuration",
                  "example": {
                    "amount": 1
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "amount": {
                          "type": "number",
                          "description": "Bid amount in the account currency",
                          "example": 1
                        }
                      },
                      "required": [
                        "amount"
                      ],
                      "title": "LinkedInUnitCostDTO"
                    }
                  ]
                },
                "audience": {
                  "description": "Targeting",
                  "example": {
                    "geoLocations": [
                      {
                        "name": "Mumbai, Maharashtra, India",
                        "urn": "urn:li:geo:106164952",
                        "facetUrn": "urn:li:adTargetingFacet:locations",
                        "selectionType": "include"
                      }
                    ],
                    "targetAudience": {
                      "include": [
                        {
                          "facet": "urn:li:adTargetingFacet:locations",
                          "values": [
                            "urn:li:geo:106164952"
                          ]
                        }
                      ],
                      "exclude": [
                        {
                          "facet": "urn:li:adTargetingFacet:staffCountRanges",
                          "values": [
                            "urn:li:staffCountRange:SIZE_1"
                          ]
                        }
                      ]
                    }
                  },
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "geoLocations": {
                          "description": "Geographic targeting",
                          "example": [
                            {
                              "name": "Mumbai, Maharashtra, India",
                              "urn": "urn:li:geo:106164952",
                              "facetUrn": "urn:li:adTargetingFacet:locations",
                              "selectionType": "include"
                            }
                          ],
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "Display name",
                                "example": "Mumbai, Maharashtra, India"
                              },
                              "urn": {
                                "type": "string",
                                "description": "Entity URN. The scheme depends on the facet being searched.",
                                "example": "urn:li:geo:106164952"
                              },
                              "facetUrn": {
                                "type": "string",
                                "description": "Facet the entity belongs to",
                                "example": "urn:li:adTargetingFacet:locations"
                              },
                              "selectionType": {
                                "type": "string",
                                "description": "Whether the location is targeted or excluded",
                                "enum": [
                                  "include",
                                  "exclude"
                                ],
                                "example": "include"
                              }
                            },
                            "required": [
                              "name",
                              "urn",
                              "facetUrn",
                              "selectionType"
                            ],
                            "title": "LinkedInGeoLocationDTO"
                          }
                        },
                        "targetAudience": {
                          "type": "object",
                          "description": "Attribute targeting, as nested include/exclude arrays",
                          "additionalProperties": true,
                          "example": {
                            "include": [
                              {
                                "facet": "urn:li:adTargetingFacet:locations",
                                "values": [
                                  "urn:li:geo:106164952"
                                ]
                              }
                            ],
                            "exclude": [
                              {
                                "facet": "urn:li:adTargetingFacet:staffCountRanges",
                                "values": [
                                  "urn:li:staffCountRange:SIZE_1"
                                ]
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "geoLocations"
                      ],
                      "title": "LinkedInCampaignAudienceDTO"
                    }
                  ]
                },
                "ads": {
                  "description": "Ads in this campaign",
                  "example": [
                    {
                      "id": "6a840c7b1c2e6acf77b1d2a8",
                      "name": "Ad 1",
                      "adCampaignId": "6a840c7b1c2e6acf77b1d2a5",
                      "adCampaignGroupId": "6a840c5a1c2e6acf77b1d258",
                      "adId": "1554451156",
                      "publishingStatus": "FAILED",
                      "linkedInError": "",
                      "introductoryText": "Grow your pipeline this quarter",
                      "description": "",
                      "destinationUrl": "https://example.com",
                      "destinationFormId": "",
                      "callToActionLabel": "APPLY",
                      "contentReferenceString": "urn:li:share:7495384246371512320",
                      "media": [
                        {
                          "type": "image",
                          "src": "https://staging.files.leadconnectorhq.com/file/abc/def.png",
                          "name": "creative.png",
                          "headline": "Try it free",
                          "destinationUrl": "example.com",
                          "fileSizeBytes": 1066210,
                          "urn": "urn:li:image:D5610AQEjSUtmzK0rjw",
                          "_id": "6a840c881c2e6acf77b1d3c9"
                        }
                      ],
                      "createdAt": "2026-08-18T07:40:43.385Z",
                      "updatedAt": "2026-08-18T07:45:04.624Z"
                    }
                  ],
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Ad identifier",
                        "example": "6a840c7b1c2e6acf77b1d2a8"
                      },
                      "name": {
                        "type": "string",
                        "description": "Ad name",
                        "example": "Ad 1"
                      },
                      "adCampaignId": {
                        "type": "string",
                        "description": "Parent ad campaign id",
                        "example": "6a840c7b1c2e6acf77b1d2a5"
                      },
                      "adCampaignGroupId": {
                        "type": "string",
                        "description": "Parent campaign group id",
                        "example": "6a840c5a1c2e6acf77b1d258"
                      },
                      "adId": {
                        "type": "string",
                        "description": "LinkedIn ad id, set once published",
                        "example": "1554451156"
                      },
                      "publishingStatus": {
                        "type": "string",
                        "description": "Publishing status",
                        "example": "FAILED"
                      },
                      "linkedInError": {
                        "type": "string",
                        "description": "Rejection or publish error from LinkedIn. Empty string when there is none.",
                        "example": ""
                      },
                      "introductoryText": {
                        "type": "string",
                        "description": "Body copy above the creative",
                        "example": "Grow your pipeline this quarter"
                      },
                      "description": {
                        "type": "string",
                        "description": "Ad description",
                        "example": ""
                      },
                      "destinationUrl": {
                        "type": "string",
                        "description": "Click destination",
                        "example": "https://example.com"
                      },
                      "destinationFormId": {
                        "type": "string",
                        "description": "Lead form id when the ad routes to a form instead of a URL",
                        "example": ""
                      },
                      "callToActionLabel": {
                        "type": "string",
                        "description": "Call-to-action button label",
                        "example": "APPLY"
                      },
                      "contentReferenceString": {
                        "type": "string",
                        "description": "URN of the underlying LinkedIn share, set once published",
                        "example": "urn:li:share:7495384246371512320"
                      },
                      "media": {
                        "description": "Creative media",
                        "example": [
                          {
                            "type": "image",
                            "src": "https://staging.files.leadconnectorhq.com/file/abc/def.png",
                            "name": "creative.png",
                            "headline": "Try it free",
                            "destinationUrl": "example.com",
                            "fileSizeBytes": 1066210,
                            "urn": "urn:li:image:D5610AQEjSUtmzK0rjw",
                            "_id": "6a840c881c2e6acf77b1d3c9"
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "Media kind",
                              "example": "image"
                            },
                            "src": {
                              "type": "string",
                              "description": "Source URL of the uploaded file",
                              "example": "https://staging.files.leadconnectorhq.com/file/abc/def.png"
                            },
                            "name": {
                              "type": "string",
                              "description": "Original file name",
                              "example": "creative.png"
                            },
                            "headline": {
                              "type": "string",
                              "description": "Headline shown with this media",
                              "example": "Try it free"
                            },
                            "destinationUrl": {
                              "type": "string",
                              "description": "Click destination for this media",
                              "example": "example.com"
                            },
                            "fileSizeBytes": {
                              "type": "number",
                              "description": "File size in bytes",
                              "example": 1066210
                            },
                            "urn": {
                              "type": "string",
                              "description": "LinkedIn media URN, set once the asset has been uploaded. Observed present on reads but absent from the upsert response, which also returns a new `_id` for the same media — the subdocument appears to be replaced on save.",
                              "example": "urn:li:image:D5610AQEjSUtmzK0rjw"
                            },
                            "_id": {
                              "type": "string",
                              "description": "Mongo subdocument id. Note `_id`, not `id` — the transform applies to the top-level document only.",
                              "example": "6a840c881c2e6acf77b1d3c9"
                            }
                          },
                          "required": [
                            "type",
                            "src",
                            "name"
                          ],
                          "title": "LinkedInAdMediaDTO"
                        }
                      },
                      "createdAt": {
                        "type": "string",
                        "description": "Created at",
                        "example": "2026-08-18T07:40:43.385Z"
                      },
                      "updatedAt": {
                        "type": "string",
                        "description": "Updated at",
                        "example": "2026-08-18T07:45:04.624Z"
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "adCampaignId",
                      "adCampaignGroupId",
                      "publishingStatus",
                      "linkedInError",
                      "introductoryText",
                      "description",
                      "destinationUrl",
                      "destinationFormId",
                      "callToActionLabel",
                      "media",
                      "createdAt",
                      "updatedAt"
                    ],
                    "title": "LinkedInAdDTO"
                  }
                },
                "createdAt": {
                  "type": "string",
                  "description": "Created at",
                  "example": "2026-08-18T07:40:43.369Z"
                },
                "updatedAt": {
                  "type": "string",
                  "description": "Updated at",
                  "example": "2026-08-18T07:45:04.746Z"
                }
              },
              "required": [
                "id",
                "name",
                "adCampaignGroupId",
                "publishingStatus",
                "linkedInError",
                "campaignType",
                "mediaType",
                "locale",
                "audience",
                "ads",
                "createdAt",
                "updatedAt"
              ],
              "title": "LinkedInAdCampaignDTO"
            }
          },
          "meta": {
            "description": "Ancillary metadata",
            "example": {
              "evaluate": "{\"opportunityScore\":60,\"confidence\":\"High\",\"band\":\"Medium\",\"categories\":[],\"fixItems\":[]}"
            },
            "allOf": [
              {
                "type": "object",
                "properties": {
                  "evaluate": {
                    "type": "string",
                    "description": "Opportunity-score result, stored as a JSON **string** rather than an object — parse before use. Present only after the campaign group has been evaluated.",
                    "example": "{\"opportunityScore\":60,\"confidence\":\"High\",\"band\":\"Medium\",\"categories\":[],\"fixItems\":[]}"
                  }
                },
                "title": "LinkedInCampaignGroupMetaDTO"
              }
            ]
          },
          "unpublishedChanges": {
            "type": "boolean",
            "description": "Whether the group has edits not yet published. Absent on reads that have never been edited; set by the upsert.",
            "example": true
          },
          "createdBy": {
            "type": "string",
            "description": "User who created the group",
            "example": "uPy3hdVIuuNlbWOpBYGw"
          },
          "updatedBy": {
            "type": "string",
            "description": "User who last updated the group",
            "example": "uPy3hdVIuuNlbWOpBYGw"
          },
          "createdAt": {
            "type": "string",
            "description": "Created at",
            "example": "2026-08-18T07:40:10.354Z"
          },
          "updatedAt": {
            "type": "string",
            "description": "Updated at",
            "example": "2026-08-18T07:45:04.812Z"
          }
        },
        "required": [
          "id",
          "name",
          "locationId",
          "linkedInAdAccountId",
          "publishingStatus",
          "linkedInError",
          "objectiveType",
          "budget",
          "adCampaigns",
          "createdBy",
          "updatedBy",
          "createdAt",
          "updatedAt"
        ],
        "title": "LinkedInCampaignGroupDTO"
      },
      "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/ads/<adId>?locationId=<LOCATIONID>' \
  -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/ads/<adId>?locationId=<LOCATIONID>', 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/ads/{adId}"

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

params = {
    "locationId": "<LOCATIONID>"
}

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/ads/<adId>?locationId=<LOCATIONID>',
  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/ads/<adId>?locationId=<LOCATIONID>")
  .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/ads/<adId>?locationId=<LOCATIONID>"
  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/ads/<adId>?locationId=<LOCATIONID>")

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/ads/<adId>?locationId=<LOCATIONID>' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
```
