0

Trying to do query for new API versioning of Linkedin API, especially with adAnalytics.

Here is my query

https://api.linkedin.com/rest/adAnalytics?q=statistics&pivots=List(value:CAMPAIGN,value:ACCOUNT,value:COMPANY)&dateRange=(start:(year:2021,month:1,day:1))&timeGranularity=(value:YEARLY)&campaigns=List(value:urn%3Ali%3AsponsoredCampaign%3A1234567)&dateRange=(end:(year:2021,month:1,day:2))

executing this through postman

-H Linkedin-Version : YYYYMM
-H X-Restli-Protocol-Version : 2.0.0
-H Content-Type : application/json

It's returning 400 with below response.

{
    "status": 400,
    "code": "ILLEGAL_ARGUMENT",
    "message": "Invalid query parameters passed to request"
}
James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

0

You are specifying dateRange multiple times. Use it only once with your start and end like so dateRange=(end:(year:2021,month:1,day:2),start:(year:2021,month:1,day:1))

Richie
  • 1