Skip to content

Instantly share code, notes, and snippets.

@charlieouyang
Created December 29, 2015 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlieouyang/85a790f652ec4e103e85 to your computer and use it in GitHub Desktop.
Save charlieouyang/85a790f652ec4e103e85 to your computer and use it in GitHub Desktop.
Contextual UI Save workflow
Save a strategy with a few Peer39 targeting segments
targeting_segments (for IAS and Peer39 segments) save
POST /api/v2.0/strategies/1119723/targeting_segments
form-body
segments.1.id:146
segments.1.restriction:INCLUDE
segments.1.operator:OR
segments.2.id:152
segments.2.restriction:INCLUDE
segments.2.operator:OR
segments.3.id:132
segments.3.restriction:INCLUDE
segments.3.operator:OR
segments.4.id:131
segments.4.restriction:INCLUDE
segments.4.operator:OR
segments.5.id:130
segments.5.restriction:INCLUDE
segments.5.operator:OR
segments.6.id:129
segments.6.restriction:INCLUDE
segments.6.operator:OR
segments.7.id:128
segments.7.restriction:INCLUDE
segments.7.operator:OR
segments.8.id:127
segments.8.restriction:INCLUDE
segments.8.operator:OR
segments.9.id:126
segments.9.restriction:INCLUDE
segments.9.operator:OR
segments.10.id:125
segments.10.restriction:INCLUDE
segments.10.operator:OR
segments.11.id:124
segments.11.restriction:INCLUDE
segments.11.operator:OR
segments.12.id:123
segments.12.restriction:INCLUDE
segments.12.operator:OR
segments.13.id:122
segments.13.restriction:INCLUDE
segments.13.operator:OR
segments.14.id:121
segments.14.restriction:INCLUDE
segments.14.operator:OR
segments.15.id:120
segments.15.restriction:INCLUDE
segments.15.operator:OR
response
<?xml version='1.0' ?>
<result called_on="2015-12-29 19:53:32.669104+00">
<entities count="15" start="0">
<entity name="Strategy Targeting Segments #1557550" id="1557550" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557551" id="1557551" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557552" id="1557552" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557553" id="1557553" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557554" id="1557554" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557555" id="1557555" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557556" id="1557556" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557557" id="1557557" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557558" id="1557558" type="strategy_targeting_segment" />
<entity name="Strategy Targeting Segments #1557559" id="1557559" type="strategy_targeting_segment" />
</entities>
<status code="ok" />
</result>
target_values (for Peer39 advanced settings of dimension code SFTY) save
POST /api/v2.0/strategies/1119723/target_values
form-body
dimensions.1.code:REGN
dimensions.1.restriction:INCLUDE
dimensions.1.operation:OR
dimensions.1.value_ids:251
In the target_values POST, we're not saving any pper39 advanced settings.
Also, it is only saving the pre-existing location target United States.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment