Thanks for following up, @pakrouse. We haven’t been able to reproduce this. Please see the example below.
# target the Android platform
$ twurl -X POST -H ads-api.twitter.com "/1/accounts/18ce54d4x5t/targeting_criteria?line_item_id=8r2yj&targeting_type=PLATFORM&targeting_value=1"
{
"data_type": "targeting_criterion",
"data": {
"line_item_id": "8r2yj",
"name": "Android",
"id": "dirqqb",
"account_id": "18ce54d4x5t",
"created_at": "2017-05-16T04:13:48Z",
"targeting_value": 1,
"updated_at": "2017-05-16T04:13:48Z",
"deleted": false,
"targeting_type": "PLATFORM"
},
"request": {
"params": {
"line_item_id": "8r2yj",
"targeting_type": "PLATFORM",
"targeting_value": 1,
"account_id": "18ce54d4x5t"
}
}
}
The id—in this case, dirqqb—is what we’ll be deleting in the subsequent step.
# deleting the targeting criterion using the batch endpoint
$ twurl -H ads-api.twitter.com -X POST -A "Content-Type: application/json" -d '[{"operation_type":"Delete","params":{"targeting_criterion_id":"dirqqb"}}]' "/1/batch/accounts/18ce54d4x5t/targeting_criteria"
{
"data_type": "targeting_criterion",
"data": [
{
"line_item_id": "8r2yj",
"name": "Android",
"id": "dirqqb",
"operator_type": "EQ",
"created_at": "2017-05-16T04:13:48Z",
"targeting_value": 1,
"updated_at": "2017-05-16T04:15:41Z",
"deleted": true,
"targeting_type": "PLATFORM"
}
],
"request": [
{
"params": {
"targeting_criterion_id": "dirqqb",
"account_id": "18ce54d4x5t"
},
"operation_type": "Delete"
}
]
}
We were able to successfully delete this targeting criterion. Notice that "deleted": true in the response. Please ensure that your request is set up the same as what’s shown above.
The NOT_FOUND error code could mean that the ID you’re specifying is incorrect (or has already been deleted).