I am trying to filter Facebook custom audience that we get via this endpoint:
var url = $"{advertiserId}/customaudiences?limit={limit}&fields=name"
+ "&filtering=[{'field':'subtype','operator':'EQUAL', 'value':'CUSTOM'}]";
The above call works and returns the users custom audience. However, I need to additionally filter custom audiences by data_source.type and data-source.subtype, i.e.
filtering=[...{'field':'data_source.type','operator':'EQUAL', 'value':'FILE_IMPORTED'}]";
I have read through the documentation and cannot see where I am going wrong.
I get an
Invalid parameter
error when trying to filter by data_source.type
Here is the documentation I've looked at:
https://developers.facebook.com/docs/marketing-api/reference/ad-account/customaudiences/
https://developers.facebook.com/docs/marketing-api/reference/custom-audience/#parameters-2
I managed to fix this by adding data_souce to my request URL and the filtering on data_source using a list I created and stored in the config:
Config: