AdCreativesV2 Batch GET API returns 400 BAD REQUEST - "Cannot process request involving multiple routing entities"

300 views Asked by At

I am making API requests to a url like this to access AdCreatives API: https://api.linkedin.com/v2/adCreativesV2?ids=List(123,456,789) (not the exact ids, but you get the idea)

Depending on the IDs used in the call, sometimes this works as expected, and sometimes I get a 400 error code response with the message "Cannot process request involving multiple routing entities"

What does this mean, and how can I fix it?

I assume I can't make a request that includes all of these ids at once, but is there a way to tell which ids are causing the problem? This could help me group similar IDs successfully to make the call.

2

There are 2 answers

0
Y.O On

Make sure that your Creatives belong to the same account. Based on LinkedIn's new error messages documentation, the new error message that will replace the "Cannot process request involving multiple routing entities" message is indicating that the ad account of the Creative_ids is not identical:

Entities should have the same ad account in batch update and batch partial update request.

0
Sherm4n On

Have you checked you are using X-Restli-Protocol-Version: 2.0.0 in the header?
For example, for me in python this looks like

headers['X-Restli-Protocol-Version'] = '2.0.0'
r = requests.get(url, headers=headers)

This is mentioned on the docs here