Demand Partners API
Creating a Demand Partner
SDK
Use tab completion with SDK to auto-complete function names or show field options!
In [40]: partner = springserve.demand_partners.new({"name": "API Docs partner"}) In [41]: print partner.id, partner.name 1764 API Docs partner
REST API
POST /api/v0/demand_partners
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
{ Â Â "name": "API Docs partner", } |
Required parameters: name
Response
Status code 200
{ 'account_id': 1, 'buy_flagged_supply': True, 'default_tier': 1, 'direct_connect': False, 'id': 1764, 'name': 'API Docs partner', 'targeting_page_attribute_profile': { 'id': 123, 'user_agent_devices': [], 'user_agent_operating_systems': [], 'detected_player_size_targeting': false, 'player_sizes': [ 'xs', 's', 'm', 'l', 'xl', 'u' ], 'detected_domain_targeting': null, 'domain_white_list': '', 'domain_list_ids': [], 'app_bundle_white_list': '', 'app_bundle_list_ids': [], 'app_name_white_list': '', 'app_name_list_ids': [], 'key_value_targeting': null, 'key_values': null, 'targeting_secure': false, 'goal_targetings': [], 'realtime_viewability': false, 'min_aspect_ratio': null, 'max_aspect_ratio': null, 'device_id_required': null, 'ip_white_list': '', 'ip_list_ids': [], 'created_at': '2018-06-21T12:56:50.442Z' }, 'targeting_spend_profile': { 'id': 5678, 'budget_metric': null, 'budget_period': null, 'budget_pacing': null, 'budget_value': null, 'created_at': '2018-06-21T12:56:50.432Z' }, 'targeting_time_profile': { 'id': 91011, 'frequency_cap_period': null, 'frequency_cap_period_amount': null, 'frequency_cap_metric': null, 'frequency_cap_value': null, 'start_date': null, 'end_date': null, 'day_parting': [], 'day_parting_users_timezone': null, 'created_at': '2018-06-21T12:56:50.436Z' }, 'third_party_fee': '0.0', 'third_party_fee_metric': 0 }
Get a Demand Partner
SDK
In [1]: partner = springserve.demand_partners.get(1764) In [2]: print partner.name "API Docs partner"
REST API
GET /api/v0/demand_partners/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Response
Status code 200
{ 'account_id': 1, 'buy_flagged_supply': True, 'default_tier': 1, 'direct_connect': False, 'id': 1764, 'name': 'API Docs partner', 'targeting_page_attribute_profile': { 'id': 123, 'user_agent_devices': [], 'user_agent_operating_systems': [], 'detected_player_size_targeting': false, 'player_sizes': [ 'xs', 's', 'm', 'l', 'xl', 'u' ], 'detected_domain_targeting': null, 'domain_white_list': '', 'domain_list_ids': [], 'app_bundle_white_list': '', 'app_bundle_list_ids': [], 'app_name_white_list': '', 'app_name_list_ids': [], 'key_value_targeting': null, 'key_values': null, 'targeting_secure': false, 'goal_targetings': [], 'realtime_viewability': false, 'min_aspect_ratio': null, 'max_aspect_ratio': null, 'device_id_required': null, 'ip_white_list': '', 'ip_list_ids': [], 'created_at': '2018-06-21T12:56:50.442Z' }, 'targeting_spend_profile': { 'id': 5678, 'budget_metric': null, 'budget_period': null, 'budget_pacing': null, 'budget_value': null, 'created_at': '2018-06-21T12:56:50.432Z' }, 'targeting_time_profile': { 'id': 91011, 'frequency_cap_period': null, 'frequency_cap_period_amount': null, 'frequency_cap_metric': null, 'frequency_cap_value': null, 'start_date': null, 'end_date': null, 'day_parting': [], 'day_parting_users_timezone': null, 'created_at': '2018-06-21T12:56:50.436Z' }, 'third_party_fee': '0.0', 'third_party_fee_metric': 0 }
Edit a Demand Partner
SDK
In [1]: partner = springserve.demand_partners.get(1764) In [2]: partner.name = "I want to change the name" In [3]: changed = partner.save() In [4]: changed.ok Out [5]: True In [5]: print changed.name "I want to change the name"
REST API
PUT /api/v0/demand_partners/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
{ Â Â Â Â "name" : "I want to change the name" } |
Response
Status code 200
{ 'account_id': 1, 'buy_flagged_supply': True, 'default_tier': 1, 'direct_connect': False, 'id': 1764, 'name': 'I want to change the name', 'targeting_page_attribute_profile': { 'id': 123, 'user_agent_devices': [], 'user_agent_operating_systems': [], 'detected_player_size_targeting': false, 'player_sizes': [ 'xs', 's', 'm', 'l', 'xl', 'u' ], 'detected_domain_targeting': null, 'domain_white_list': '', 'domain_list_ids': [], 'app_bundle_white_list': '', 'app_bundle_list_ids': [], 'app_name_white_list': '', 'app_name_list_ids': [], 'key_value_targeting': null, 'key_values': null, 'targeting_secure': false, 'goal_targetings': [], 'realtime_viewability': false, 'min_aspect_ratio': null, 'max_aspect_ratio': null, 'device_id_required': null, 'ip_white_list': '', 'ip_list_ids': [], 'created_at': '2018-06-21T12:56:50.442Z' }, 'targeting_spend_profile': { 'id': 5678, 'budget_metric': null, 'budget_period': null, 'budget_pacing': null, 'budget_value': null, 'created_at': '2018-06-21T12:56:50.432Z' }, 'targeting_time_profile': { 'id': 91011, 'frequency_cap_period': null, 'frequency_cap_period_amount': null, 'frequency_cap_metric': null, 'frequency_cap_value': null, 'start_date': null, 'end_date': null, 'day_parting': [], 'day_parting_users_timezone': null, 'created_at': '2018-06-21T12:56:50.436Z' }, 'third_party_fee': '0.0', 'third_party_fee_metric': 0 }