Inconsistent Targeting_Value for Targeting_type = Language On 8th July


#1

I am looking for Targeting Criteria on Line Item ID.

As per document, this API call should always return a language code for Targeting value in case of Targeting Type is Language.
But, precisely on 8th July I observed that, Twitter API did not return Targeting Value the way it was sending before, only if the Targeting Type is Language.

Below is the data we received on 8th July

https://ads-api.twitter.com/0/accounts/{acctid}/targeting_criteria?line_item_id={lineitemid}&with_deleted=true&count=100
{
“line_item_id”: “******”,
“name”: “English”,
“id”: “******”,
“account_id”: “******”,
“created_at”: “2015-01-31T20:33:08Z”,
“targeting_value”: {
“id”: 4,
“code”: “en”,
“name”: “English”,
“created_at”: {
“posixTime”: 1394746281
},
“updated_at”: {
“posixTime”: 1394746281
},
“deleted”: 0
},
“updated_at”: “2015-01-31T20:33:08Z”,
“deleted”: false,
“targeting_type”: “LANGUAGE”
},

Below is the response I received before and after 8th July.

{
“line_item_id”: “",
“name”: “English”,
“id”: "
",
“account_id”: "
*****”,
“created_at”: “2015-01-31T20:33:08Z”,
“targeting_value”: “en”,
“updated_at”: “2015-01-31T20:33:08Z”,
“deleted”: false,
“targeting_type”: “LANGUAGE”
},

Can you please help me to understand the changes and its possibility of future occurrences? Or the conditions when API will return such values.
Also, tell me if you need any further information from my side.


#2

Hi,

The response you received before July 8th was a regression/bug and we basically do not expect this to happen on a “regular” basis. The response format is considered to be locked down for the most part, the case which most often happens on accident is an extra field will start to appear so I would recommend to NOT fail out if that happens (in spirit of robustness).

Thanks,

John


#3

Thanks for the quick reply.

You mentioned that Before 8th July there was a bug.
But, my question was specific for the 8th July (not before or after). Because, this is the only date when I saw the discrepancies.
Before and After 8th July the response is as per my expectation.

{
“line_item_id”: “",
“name”: “English”,
“id”: "
",
“account_id”: "
*****”,
“created_at”: “2015-01-31T20:33:08Z”,
“targeting_value”: “en”,
“updated_at”: “2015-01-31T20:33:08Z”,
“deleted”: false,
“targeting_type”: “LANGUAGE”
},

please confirm if the above response (specially highlighted in BOLD) what we are getting now is the consistent and expected one.


#4

Yes that’s the consistent response. For any planned response format changes, you should keep an eye out for announcements either on this forum or by following @AdsAPI Twitter handle.

Thanks,

John


#5

Thanks John.