SpotX Connect Tag API
Creating a SpotX Connect Tag
SDK
Use tab completion with SDK to auto-complete function names or show field options!
In [1]: import springserve In [2]: tag = springserve.spotx_connects.new({"name": "SpotX Connect Tag Name Docs", "account_id": 391, "spotx_channel_id": 880933, "bid_floor_type": "static", "rate": 0.01}) In [3]: print tag.ok, tag.id True, 894173
"bid_floor_type" can be "static" or "dynamic".
REST API
POST /api/v0/spotx_connects
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
{ "name": "SpotX Connect Tag Name Docs", "account_id": 391, "spotx_channel_id": 880933, "rate": 0.01, "bid_floor_type": "static" }
Required parameters: name, account_id, spotx_channel_id, rate, bid_floor_type.
Response
Status code 200
{ "id": 894173, "account_id": 391, "name": "SpotX Connect Tag Name Docs", "active": true, "rate": "0.01", "domain_targeting": "All", "app_name_targeting": "All", "app_bundle_targeting": "All", "ip_targeting": "All", "country_targeting": "All", "state_targeting": "All", "city_targeting": "All", "player_size_targeting": "All", "dma_targeting": "All", "allowed_player_sizes": [ "xs", "s", "m", "l", "xl", "u" ], "country_codes": [], "state_codes": [], "city_codes": [], "domain_list_ids": [], "app_name_list_ids": [], "app_bundle_list_ids": [], "ip_list_ids": [], "dma_codes": [], "user_agent_devices": [], "user_agent_brands": [], "user_agent_operating_systems": [], "user_agent_browsers": [], "updated_at": "2021-05-01T15:02:23.649Z", "created_at": "2021-05-01T15:02:23.649Z", "direct_connect": false, "segment_targeting_enabled": false, "media_file_mime_type_targeting": false, "media_file_mime_types": [], "blocking_unknown_media_file_mime_type": false, "media_file_duration_targeting": false, "media_file_min_duration": null, "media_file_max_duration": null, "blocking_unknown_media_file_duration": false, "media_file_bit_rate_targeting": false, "media_file_min_bit_rate": null, "media_file_max_bit_rate": null, "blocking_unknown_media_file_bit_rate": false, "demand_code": null, "demand_label_ids": [], "demand_partner_id": 54493, "demand_class": 9, "timeout": 3000, "pre_bid_blocking_enabled": false, "pre_bid_blocking_components": [], "post_imp_detection_enabled": false, "post_imp_percentage_whiteops": 0, "post_imp_percentage_moat": 0, "post_imp_percentage_ias": 0, "post_imp_percentage_protected": 0, "post_imp_percentage_forensiq": 0, "start_date": null, "end_date": null, "flight_dates_timezone": null, "targeting_secure": false, "block_coppa_enabled": false, "key_value_targeting": false, "postal_code_targeting": "All", "postal_codes": [], "environment": "ctv", "realtime_viewability": false, "bid_floor_type": "static", "bid_platform": null, "bid_margin": null, "bid_params": null, "bid_optional_params": null, "min_aspect_ratio": null, "max_aspect_ratio": null, "creative_landing_page_url": null, "format": "video", "device_id_required": false, "competitive_exclusions_enabled": false, "advertiser_domain_list_ids": [], "suppress_xff_ip": false, "share_of_voice_goal_percent": null, "respect_pod_order": false, "multi_call_enabled": false, "multi_call_maximum": 2, "spotx_channel_id": 880933, "respect_spotx_tier": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], "spotx_joint_solution_optional_params": null, "segment_groups": [], "tag_pixels": [], "macro_overrides": [], "custom_vast_extensions": [], "budgets": [], "frequency_caps": [], "targeting_keys": [], "supply_tag_assignments": [], "line_item_ratios": [], "supply_spotx_connects": [] }
Get a SpotX Connect tag by id
SDK
In [1]: tag = springserve.spotx_connects.get(894173) In [2]: print tag.name "SpotX Connect Tag Name Docs"
REST API
GET /api/v0/spotx_connects/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Response
Status code 200
{ "id": 894173, "account_id": 391, "name": "SpotX Connect Tag Name Docs", "active": true, "rate": "0.01", ... }
Edit a SpotX Connect Tag
SDK
In [1]: tag = springserve.spotx_connects.get(30424) In [2]: tag.name = "SpotX Connect Tag Name Docs (new name)" In [3]: changed = tag.save() In [4]: changed.ok Out [4]: True In [5]: print changed.name "SpotX Connect Tag Name Docs (new name)"
REST API
PUT /api/v0/spotx_connects/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
{ "name" : "SpotX Connect Tag Name Docs (new name)" } |
Response
Status code 200
{ "id": 894173, "account_id": 391, "name": "SpotX Connect Tag Name Docs (new name)", "active": true, "rate": "0.01", ... }
Duplicate a SpotX Connect Tag
SDK
In [1]: tag = springserve.spotx_connects.get(894173) ln [2]: dupe = tag.duplicate() ln [3]: dupe.ok Out [3]: True In [4]: print dupe.id 893716
REST API
GET /api/v0/spotx_connects/<id>/duplicate
Headers
Content-Type application/json Authorization "yourAuthToken"
Response
Status code 201
{ "id": 894173, "account_id": 391, "name": "SpotX Connect Tag Name Docs (copy)", "active": true, "rate": "0.01", ... }
Enabling a SpotX Connect for a Supply Tag
SDK
In [1]: import springserve In [2]: tag = springserve.supply_tags.get(638465) In [3]: tag.spotx_connect_enabled = True In [4]: saved_tag = tag.save() In [5]: print saved_tag.ok, saved_tag.id True, 638465
REST API
PATCH /api/v0/supply_tags/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
|
Response
Status code 200
{ "id": 638465, "account_id": 391, "name": "Tag Name Docs", "active": true, "rate": "0.01", ... "spotx_connect_enabled": true, ... }
Adding SpotX Connect to a Supply Tag
SDK
In [1]: import springserve In [2]: tag = springserve.supply_tags.get(638465) In [3]: tag.supply_spotx_connects = [{'spotx_connect_id': 893715}] In [4]: saved_tag = tag.save() In [5]: print saved_tag.ok, saved_tag.id True, 638465
REST API
PATCH /api/v0/supply_tags/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
|
Response
Status code 200
{ "id": 638465, "account_id": 391, "name": "Tag Name Docs", "active": true, "rate": "0.01", ... "spotx_connect_enabled": true, "supply_spotx_connects": [ { "spotx_connect_id": 893715 } ], "demand_tag_priorities": [{"demand_tag_id": 880921, "priority": 1, "tier": 5, "locked": False, "ratio": None, "slot_number": None, "slot_order": None}] ... }
Changing Tier to a Supply Tag with SpotX Connect
By default, when a SpotX Connection is added to a Supply Tag, its Tier is set to 5.
The Tier can be accessed through a "master id" in demand_tag_priorities, that will be the same across each account.
SDK
In [1]: import springserve In [2]: tag = springserve.supply_tags.get(638465) In [3]: tag.demand_tag_priorities[0]["tier"] = 3 In [4]: saved_tag = tag.save() In [5]: print saved_tag.ok, saved_tag.demand_tag_priorities[0]["tier"]) True, 3
REST API
PATCH /api/v0/supply_tags/<id>
Headers
Content-Type application/json Authorization "yourAuthToken"
Body (example)
|
Response
Status code 200
{ "id": 638465, "account_id": 391, "name": "Tag Name Docs", "active": true, "rate": "0.01", ... "spotx_connect_enabled": true, "supply_spotx_connects": [ { "spotx_connect_id": 893715 } ], "demand_tag_priorities": [{"demand_tag_id": 880921, "priority": 1, "tier": 3, "locked": False, "ratio": None, "slot_number": None, "slot_order": None}] ... }