Operator Type Error for Batch Targeting Post Call


#1

Request url: https://ads-api.twitter.com/1/batch/accounts/18t5pf/targeting_criteria/
Body: [{“params”:{“targeting_type”:“IAB_CATEGORY”,“line_item_id”:“5lx6k”,“targeting_value”:“IAB10-2”,“negated”:false,“deleted”:false,“operator_type”:“EQ”},“operation_type”:“Create”},{“params”:{“targeting_type”:“IAB_CATEGORY”,“line_item_id”:“5lx6k”,“targeting_value”:“IAB10-4”,“negated”:false,“deleted”:false,“operator_type”:“EQ”},“operation_type”:“Create”},{“params”:{“targeting_type”:“IAB_CATEGORY”,“line_item_id”:“5lx6k”,“targeting_value”:“IAB10-5”,“negated”:false,“deleted”:false,“operator_type”:“EQ”},“operation_type”:“Create”},{“params”:{“targeting_type”:“LOCATION”,“line_item_id”:“5lx6k”,“targeting_value”:“96683cc9126741d1”,“negated”:false,“deleted”:false,“operator_type”:“EQ”},“operation_type”:“Create”},{“params”:{“targeting_type”:“PLATFORM_VERSION”,“line_item_id”:“5lx6k”,“targeting_value”:“b”,“negated”:false,“deleted”:false,“operator_type”:“EQ”},“operation_type”:“Create”},{“params”:{“targeting_type”:“DEVICE”,“line_item_id”:“5lx6k”,“targeting_value”:“4n”,“negated”:false,“deleted”:false,“operator_type”:“EQ”},“operation_type”:“Create”}]

Response 400
{“request”:[{“params”:{“line_item_id”:“5lx6k”,“account_id”:“18t5pf”,“operator_type”:“EQ”,“targeting_value”:“IAB10-2”,“targeting_type”:“IAB_CATEGORY”},“operation_type”:“Create”},{“params”:{“line_item_id”:“5lx6k”,“account_id”:“18t5pf”,“operator_type”:“EQ”,“targeting_value”:“IAB10-4”,“targeting_type”:“IAB_CATEGORY”},“operation_type”:“Create”},{“params”:{“line_item_id”:“5lx6k”,“account_id”:“18t5pf”,“operator_type”:“EQ”,“targeting_value”:“IAB10-5”,“targeting_type”:“IAB_CATEGORY”},“operation_type”:“Create”},{“params”:{“line_item_id”:“5lx6k”,“account_id”:“18t5pf”,“operator_type”:“EQ”,“targeting_value”:“96683cc9126741d1”,“targeting_type”:“LOCATION”},“operation_type”:“Create”},{“params”:{“line_item_id”:“5lx6k”,“account_id”:“18t5pf”,“operator_type”:“EQ”,“targeting_value”:“b”,“targeting_type”:“PLATFORM_VERSION”},“operation_type”:“Create”},{“params”:{“line_item_id”:“5lx6k”,“account_id”:“18t5pf”,“operator_type”:“EQ”,“targeting_value”:“4n”,“targeting_type”:“DEVICE”},“operation_type”:“Create”}],“operation_errors”:[[],[],[],[],[{“code”:“INVALID”,“message”:“OS Version targeting criterion operator must be GREATER_THAN_OR_EQUAL_TO”,“attribute”:“operator_type”}],[]]}

“OS Version targeting criterion operator must be GREATER_THAN_OR_EQUAL_TO”

But on giving the operator_type as GREATER_THAN_OR_EQUAL_TO, the response complains for unidentified operator type.

Is there any documentation for available operator_type?


#2

@JBabichJapan @hector_borras @hwz


#3

Hi @abhishek_pyro

I’ve some ideas that what could be happening:

  1. As BATCH POST TARGETING CRITERIA says, Note: These batch endpoints for the Ads API are currently part of a closed beta and are not yet generally available. - Are you whitelisted on this endpoint?

  2. As the response says, you should put GREATER_THAN_OR_EQUAL_TO operator. If you check this targeting option in Ads UI, you will see that you CAN’T target people for an specific OS version, you should put a minimum OS version. You could try 2 things, first, change ‘EQ’ for ‘GTE’ (equal -> greater than equal). Second: don’t provide operator type.

Hope this will help you.

Thanks!


#4

@hector_borras thanks for the quick response, let me try by putting GTE and update you


#5

@hector_borras thanks again for the help on this, score 2-0 :smile:

I hope I don’t run into anymore operator issues, since there is no documentation available.