Invalid operator type when creating platform version targeting through V1 endpoint

faq

#1

Hi,

I am running into an ‘invalid operator type’ issue when trying to create a platform version targeting with the v1 POST batch targeting criteria endpoint.

When I don’t include an operator type, i get the following error message:
OS Version targeting criterion operator must be GREATER_THAN_OR_EQUAL_TO

When I do include an operator type GREATER_THAN_OR_EQUAL_TO, I get the following error message:
Expected valid operator type, got \"GREATER_THAN_OR_EQUAL_TO\

Could you please advise? Thanks!

Following are examples of the calls:

without operator_type:

<=== [2016-08-09 19:50:30 +0000 :: ouhcxwdcc :: 8elu :: 1851862034] twurl -H ads-api.twitter.com -X POST -d "[{"operation_type":"Create","params":{"line_item_id":"5wz4w","targeting_type":"PLATFORM_VERSION","targeting_value":"a"}}]" "/1/batch/accounts/18ce53uuf0f/targeting_criteria"
===> [2016-08-09 19:50:30 +0000 :: ouhcxwdcc :: 8elu :: 400 Bad Request :: 0.524s :: 299/300 (…56s)] {"request":[{"params":{"line_item_id":"5wz4w","targeting_type":"PLATFORM_VERSION","targeting_value":"a","account_id":"18ce53uuf0f"},"operation_type":"Create"}],"operation_errors":[[{"code":"INVALID","message":"OS Version targeting criterion operator must be GREATER_THAN_OR_EQUAL_TO","attribute":"operator_type"}]]}

with operator_type:

<=== [2016-08-09 20:06:10 +0000 :: ouxp6xor8 :: d28z :: 1851862034] twurl -H ads-api.twitter.com -X POST -d "[{"operation_type":"Create","params":{"line_item_id":"5wzks","targeting_type":"PLATFORM_VERSION","targeting_value":"8","operator_type":"GREATER_THAN_OR_EQUAL_TO"}}]" "/1/batch/accounts/18ce53uuf0f/targeting_criteria"
===> [2016-08-09 20:06:19 +0000 :: ouxp6xor8 :: d28z :: 400 Bad Request :: 8.291s :: 299/300 (…48s)] {"request":[{"params":{"line_item_id":"5wzks","targeting_type":"PLATFORM_VERSION","targeting_value":"8","account_id":"18ce53uuf0f"},"operation_type":"Create"}],"operation_errors":[[{"code":"INVALID_PARAMETER","message":"Expected valid operator type, got \"GREATER_THAN_OR_EQUAL_TO\" for operator_type","parameter":"creative_source"}]]}

#2

Hey there,

instead of the suggested “GREATER_THAN_OR_EQUAL_TO” returned in the error message, please pass in “GTE” instead. We’ll update this to make this clear shortly.

The valid operator_type values are:

  • greater than or equal to: GTE
  • not equal to: NE
  • equal to: EQ
  • less than: LT