Complete list of available values returned in nested responses

documentation
campaign-management

#1

For a number of ‘get’ campaign management dimensional calls such as get campaigns, get funding instruments, etc. there are certain fields where the value for a particular key/field is an array e.g. reasons_not_servable which can contain multiple values. As we are looking to store data we retrieve in a relational database we are looking at methods for handling these nested dimensional values and ideally we would like them to be separate fields where the field name would be the array value and the field value would be true or false – please see the example input and output pasted below where I have highlighted the reasons_not_servable field as it arrives in the data and as we would like it stored in our database.

However in order to do this we would need to know all the possible values that could appear in any such nested fields across the various Campaign Management and Creative GET calls. Is this something that can be provided.

Example input – GET campaigns:

{
“data”: [
{
“created_at”: “2012-08-09T21:06:41Z”,
“total_budget_amount_local_micro”: 11110000000,
“servable”: false,
“name”: “Campaign 1”,
“deleted”: false,
“start_time”: “2012-08-09T21:05:00Z”,
“standard_delivery”: true,
“reasons_not_servable”: [
“EXPIRED”,
“FUNDING_PROBLEM”
],
“updated_at”: “2012-08-30T22:03:05Z”,
“daily_budget_amount_local_micro”: 11000000,
“paused”: true,
“currency”: “USD”,
“end_time”: “2012-08-31T06:59:00Z”,
“funding_instrument_id”: “gxxxx”,
“id”: “2xxx”,
“account_id”: “dxxx”
},
{
“created_at”: “2014-11-06T02:18:22Z”,
“total_budget_amount_local_micro”: 4000000000,
“servable”: false,
“name”: “Campaign 2”,
“deleted”: false,
“start_time”: “2014-11-06T14:30:00Z”,
“standard_delivery”: true,
“reasons_not_servable”: [
“EXPIRED”,
“FUNDING_PROBLEM”
],
“updated_at”: “2014-11-10T19:55:29Z”,
“daily_budget_amount_local_micro”: 3300000000,
“paused”: true,
“currency”: “USD”,
“end_time”: “2014-11-11T07:59:00Z”,
“funding_instrument_id”: “ixxxx”,
“id”: “1xxxx”,
“account_id”: “dxxxx”
}
],
“next_cursor”: “8t59zc6bk”,
“request”: {
“params”: {
“account_id”: “dxxxx”
}
},
“data_type”: “campaign”,
“total_count”: 637
}

Desired Output in Database:


#2

Hello,

I believe the information you are looking for is in our “Enums” page here: https://dev.twitter.com/ads/basics/enums

Thanks,
John


#3

Hi John,

Thanks so much!! Apologies for not spotting this ourselves!!


#4

This helped us well. Perhaps the documentation can link to the enum page section for this.