Batch delete FOLLOWERS_OF_USER targeting criteria throws an error

targeting

#1

When trying to delete a FOLLOWERS_OF_USER target on the batch endpoint, I’m receiving an error that the target does not exist, even though a GET request to the targeting_criteria endpoint says otherwise:

Delete error:

{
  "request": [
    {
      "params": {
        "targeting_criterion_id": "dim0ai",
        "account_id": "XXXXXX"
      },
      "operation_type": "Delete"
    }
  ],
  "operation_errors": [
    [
      {
        "code": "NOT_FOUND",
        "message": "targeting criterion dim0ai was not found for account XXXXXX"
      }
    ]
  ]
}

GET request (showing target does exist):

{
  "request": {
    "params": {
      "line_item_id": "8dqoj",
      "account_id": "XXXXXX"
    }
  },
  "data": [
    {
      "line_item_id": "8dqoj",
      "name": "hyfntest",
      "id": "dim0ai",
      "operator_type": "EQ",
      "created_at": "2017-05-15T21:57:55Z",
      "targeting_value": "3073813016",
      "updated_at": "2017-05-15T21:57:55Z",
      "deleted": false,
      "targeting_type": "FOLLOWERS_OF_USER"
    }
  ],
  "data_type": "targeting_criterion",
  "total_count": 1,
  "next_cursor": null
}

@juanshishido is this another bug with the batch delete processing?


Deleting existing targeting criteria through `POST batch/accounts/:account_id/targeting_criteria` result in a 404
#2

@pakrouse: Thanks for providing these details. We’ve been able to repro and will take a closer look to determine what could be going on.

$ twurl -H ads-api.twitter.com -X POST -A "Content-Type: application/json" -d '[{"operation_type":"Delete","params":{"targeting_criterion_id":"diruas"}}]' "/1/batch/accounts/18ce54d4x5t/targeting_criteria" | jq
{
  "request": [
    {
      "params": {
        "targeting_criterion_id": "diruas",
        "account_id": "18ce54d4x5t"
      },
      "operation_type": "Delete"
    }
  ],
  "operation_errors": [
    [
      {
        "code": "NOT_FOUND",
        "message": "targeting criterion diruas was not found for account 18ce54d4x5t"
      }
    ]
  ]
}

Thanks for bringing this to our attention.


#4

Closing the loop here. This issue was resolved. See this thread.