Hello,
I am currently using the custom audience endpoint of the Ads API to upload custom audiences with hashed emails. The HTTP response seems normal for successful uploads (per documentation):
{
“request”: {
“params”: {
“account_id”: “18ce54d4x5t”,
“custom_audience_id”: “1nmth”
}
},
“data”: {
“success_count”: 4,
“total_count”: 4
}
}
However, the HTTP response is formatted slightly different when errors occur in the upload (injected one for testing). Instead of “request” being a single JSON object, it appears to be returned as an array of JSON objects.
{
“request”: [
{
“params”: {
“account_id”: “18ce54d4x5t”,
“custom_audience_id”: “1nmth”
},
“operation_type”: “Update”
}
],
“operation_errors”: [
[
{
“code”: “INVALID_PARAMETER”,
“message”: “(2022-05-27T19:29Z) should be in ISO 8601 format”,
“parameter”: “”
}
]
]
}
Was this an intended formatting change? The differing response formats is leading to difficulties when calling the gson.fromJson function to convert the JSON response to Java Object.