Supply Routers API

Supply Routers API


Creating a Supply Router

SDK

 

 

Use tab completion with SDK to auto-complete function names or show field options.

router = springserve.supply_routers.new({"name": "Test Router", "supply_partner_id":47340}) print router.id, router.name 1764 Test Router

REST API

Method: POST

Endpoint URL: /api/v0/supply_routers

Parameters:

  • name - (required, type: string) Name of the new supply router.

  • supply_partner_id - (required, type: integer) ID of supply partner to be associated with.

Request:

POST /api/v0/supply_routers Content-Type: application/json Authorization: "yourAuthToken" { "name": "Test Router 3", "supply_partner_id":66463 }

Response:

HTTP/1.1 201 Created Content-Type: application/json { "id": 25530, "account_id": 391, "name": "Test Router", "active": true, "supply_partner_id": 66463, "environment": "ctv", "domain_white_list": "", "app_name_white_list": "", "app_bundle_white_list": "", "ip_white_list": "", "advertiser_domain_white_list": "", "post_imp_detection_enabled": false, "post_imp_percentage_whiteops": 0, "post_imp_percentage_ias": 0, "post_imp_percentage_moat": 0, "post_imp_percentage_protected": 0, "post_imp_percentage_forensiq": 0, "pre_bid_blocking_enabled": false, "pre_bid_blocking_components": [], "key_ids": [], "note": null, "min_aspect_ratio": null, "max_aspect_ratio": null, "format": "video", "third_party_override": true, "player_sizes": [ "xs", "s", "m", "l", "xl", "u" ], "domain_list_ids": [], "advertiser_domain_list_ids": [], "app_bundle_list_ids": [], "app_name_list_ids": [], "ip_list_ids": [], "user_agent_devices": [], "user_agent_brands": [], "user_agent_operating_systems": [], "user_agent_browsers": [], "segment_targeting_enabled": false, "blocking_unknown_advertiser_domains": false, "country_source": "values", "country_list_ids": [], "metro_area_source": "values", "metro_area_list_ids": [], "targeted_iab_category_white_list": "", "targeted_iab_categories": [], "targeted_iab_tier2_categories": [], "targeted_iab_tier2_category_white_list": "", "dnt_values": [], "dnt_param_required": false, "lmt_values": [], "lmt_param_required": false, "us_privacy_supply_white_list": "", "us_privacy_param_required": false, "us_privacy_values": [], "gdpr_supply_values": [], "gdpr_supply_param_required": false, "gdpr_consent_string_values": [], "gdpr_consent_param_required": false, "coppa_values": [], "coppa_param_required": false, "audited_creative_statuses": [], "country_white_list": "", "country_codes": [], "metro_area_white_list": "", "metro_area_codes": [], "tag_pixels": [], "segment_groups": [], "supply_router_ratios": [] }

Examples

Python Example

import requests import json url = "https://console.springserve.com/api/v0/supply_routers" payload = json.dumps({ "name": "Test Router", "supply_partner_id": 66463 }) headers = { 'Authorization': 'yourAuthToken', 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)

 

NodeJS Example

var request = require('request'); var options = { 'method': 'POST', 'url': 'https://console.springserve.com/api/v0/supply_routers', 'headers': { 'Authorization': 'yourAuthToken', 'Content-Type': 'application/json' }, body: JSON.stringify({ "name": "Test Router", "supply_partner_id": 66463 }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });

Get a Supply Router

SDK

In [1]: per = springserve.supply_routers.get(1234) In [2]: print router.name "Test Router"

REST API

Method: GET

Endpoint URL: /api/v0/supply_routers/<id>

Parameters:

  • id - (required, type: integer) ID of the supply router.

Request:

GET /api/v0/supply_routers/25528 Content-Type: application/json Authorization: "yourAuthToken"

Response:

HTTP/1.1 200 OK Content-Type: application/json { "id": 25528, "account_id": 391, "name": "Rest API Demo Router", "active": true, "supply_partner_id": 66463, "environment": "desktop", "domain_white_list": "", "app_name_white_list": "", "app_bundle_white_list": "", "ip_white_list": "", "advertiser_domain_white_list": "", "post_imp_detection_enabled": false, "post_imp_percentage_whiteops": 0, "post_imp_percentage_ias": 0, "post_imp_percentage_moat": 0, "post_imp_percentage_protected": 0, "post_imp_percentage_forensiq": 0, "pre_bid_blocking_enabled": false, "pre_bid_blocking_components": [], "key_ids": [], "note": "", "min_aspect_ratio": null, "max_aspect_ratio": null, "format": "video", "third_party_override": true, "player_sizes": [ "xs", "s", "m", "l", "xl", "u" ], "domain_list_ids": [], "advertiser_domain_list_ids": [], "app_bundle_list_ids": [], "app_name_list_ids": [], "ip_list_ids": [], "user_agent_devices": [], "user_agent_brands": [], "user_agent_operating_systems": [], "user_agent_browsers": [], "segment_targeting_enabled": false, "blocking_unknown_advertiser_domains": false, "country_source": "values", "country_list_ids": [], "metro_area_source": "values", "metro_area_list_ids": [], "targeted_iab_category_white_list": "", "targeted_iab_categories": [], "targeted_iab_tier2_categories": [], "targeted_iab_tier2_category_white_list": "", "dnt_values": [], "dnt_param_required": false, "lmt_values": [], "lmt_param_required": false, "us_privacy_supply_white_list": "", "us_privacy_param_required": false, "us_privacy_values": [], "gdpr_supply_values": [], "gdpr_supply_param_required": false, "gdpr_consent_string_values": [], "gdpr_consent_param_required": false, "coppa_values": [], "coppa_param_required": false, "audited_creative_statuses": [], "country_white_list": "", "country_codes": [], "metro_area_white_list": "", "metro_area_codes": [], "tag_pixels": [], "segment_groups": [], "supply_router_ratios": [] }

Examples

Python Example

import requests import json url = "https://console.springserve.com/api/v0/supply_routers/25528" payload = {} headers = { 'Authorization': 'yourAuthToken', 'Content-Type': 'application/json' } response = requests.request("GET", url, headers=headers, data=payload) print(response.text)

NodeJS Example

var request = require('request'); var options = { 'method': 'GET', 'url': 'https://console.springserve.com/api/v0/supply_routers/25528', 'headers': { 'Authorization': 'yourAuthToken', 'Content-Type': 'application/json' } }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });

 

Edit a Supply Router

SDK

In [1]: router = springserve.supply_routers.get(1234) In [2]: router.name = "Test Router with new name" In [3]: changed = router.save() In [4]: changed.ok Out [4]: True In [5]: print changed.name "Test Router with new name"

REST API

Method: PATCH

Endpoint URL: /api/v0/supply_routers/<id>

Notes - See response for all parameters that can be edited.

Parameters:

  • id - (required, type: integer) ID of the supply router.

Request:

PATCH /api/v0/supply_routers/25528 HTTP/1.1 Host: console.springserve.com Content-Type: application/json Authorization: "yourAuthToken" { "name": "New API Demo Router Name" }

 

Response:

HTTP/1.1 200 OK Content-Type: application/json { "id": 25530, "account_id": 391, "name": "New API Demo Router Name", "active": true, "supply_partner_id": 66463, "environment": "ctv", "domain_white_list": "", "app_name_white_list": "", "app_bundle_white_list": "", "ip_white_list": "", "advertiser_domain_white_list": "", "post_imp_detection_enabled": false, "post_imp_percentage_whiteops": 0, "post_imp_percentage_ias": 0, "post_imp_percentage_moat": 0, "post_imp_percentage_protected": 0, "post_imp_percentage_forensiq": 0, "pre_bid_blocking_enabled": false, "pre_bid_blocking_components": [], "key_ids": [], "note": null, "min_aspect_ratio": null, "max_aspect_ratio": null, "format": "video", "third_party_override": true, "player_sizes": [ "xs", "s", "m", "l", "xl", "u" ], "domain_list_ids": [], "advertiser_domain_list_ids": [], "app_bundle_list_ids": [], "app_name_list_ids": [], "ip_list_ids": [], "user_agent_devices": [], "user_agent_brands": [], "user_agent_operating_systems": [], "user_agent_browsers": [], "segment_targeting_enabled": false, "blocking_unknown_advertiser_domains": false, "country_source": "values", "country_list_ids": [], "metro_area_source": "values", "metro_area_list_ids": [], "targeted_iab_category_white_list": "", "targeted_iab_categories": [], "targeted_iab_tier2_categories": [], "targeted_iab_tier2_category_white_list": "", "dnt_values": [], "dnt_param_required": false, "lmt_values": [], "lmt_param_required": false, "us_privacy_supply_white_list": "", "us_privacy_param_required": false, "us_privacy_values": [], "gdpr_supply_values": [], "gdpr_supply_param_required": false, "gdpr_consent_string_values": [], "gdpr_consent_param_required": false, "coppa_values": [], "coppa_param_required": false, "audited_creative_statuses": [], "country_white_list": "", "country_codes": [], "metro_area_white_list": "", "metro_area_codes": [], "tag_pixels": [], "segment_groups": [], "supply_router_ratios": [] }

Examples

Python Example

import requests import json url = "https://console.springserve.com/api/v0/supply_routers/25528" payload = { "name": "New API Demo Router Name" } headers = { 'Authorization': 'yourAuthToken', 'Content-Type': 'application/json' } response = requests.request("PATCH", url, headers=headers, data=payload) print(response.text)

NodeJS Example

var request = require('request'); var options = { 'method': 'PATCH', 'url': 'https://console.springserve.com/api/v0/supply_routers/25528', 'headers': { 'Authorization': 'yourAuthToken', 'Content-Type': 'application/json' }, body: JSON.stringify({ "name": "New API Demo Router Name" }) }; request(options, function (error, response) { if (error) throw new Error(error); console.log(response.body); });

Object Descriptions

Object Name

Value Type

Object Description

Example

Notes

Object Name

Value Type

Object Description

Example

Notes

Id

integer

supply router ID

25530

 

account_id

integer

account ID

391

 

name

string

supply router name

"API Example Router"

 

active

boolean

status of router

true / false

 

supply_partner_id

integer

ID of supply partner assigned

66463

 

environment

string

supply device environment type

"desktop" / "mobile_web" / "in_app" / "ctv"

 

domain_white_list

boolean

domain targeting active

true (allowlist) / false (blocklist) / null (all domains)

use for environment "desktop" or "mobile_web". use in conjunction with domain_list_ids

domain_list_ids

array integer

ID of domain lists 

[211852, 123456]

created under targeting tab in UI. use in conjunction with domain_white_list

app_name_white_list

boolean

app name targeting active

true (allowlist) / false (blocklist) / null (all app names)

use for environment "in_app" or "ctv". use in conjunction with app_name_list_ids

app_name_list_ids

array

ID of app name lists 

[527, 5352]

created under targeting tab in UI. use in conjunction with app_name_white_list

app_bundle_white_list

boolean

app bundle targeting active

true (allowlist) / false (blocklist) / null (all bundles)

use for environment "in_app" or "ctv". use in conjunction with app_bundle_list_ids

app_bundle_list_ids

array integer

ID of app bundle lists 

[250761, 247375]

created under targeting tab in UI. use in conjunction with app_bundle_white_list

ip_white_list

boolean

IP targeting active

true (allowlist) / false (blocklist) / null (all IPs)

use in conjunction with ip_list_ids

ip_list_ids

array integer

ID of IP lists 

[164, 907]

created under targeting tab in UI. use in conjunction with ip_white_list

advertiser_domain_white_list

boolean

advertiser domain active

true (allowlist) / false (blocklist) / null (all advertiser domains)

use in conjunction with advertiser_domain_list_ids

advertiser_domain_list_ids

array integer

ID of advertiser domain lists

[433, 484]

created under targeting tab in UI. use in conjunction with advertiser_domain_white_list

post_imp_detection_enabled

boolean

post impression detection active

true / false

specify the portion of impressions on which to run verification. sampling rates are independant per verification provider. use in conjunction with below post_imp_percentage fields

post_imp_percentage_whiteops

integer

post impression percentage Whiteops (HUMAN)

0 - 100

use in conjunction with below post_imp_detection_enabled

post_imp_percentage_ias

integer

post impression percentage IAS

0 - 100

use in conjunction with below post_imp_detection_enabled

post_imp_percentage_moat

integer

post impression percentage MOAT

0 - 100

use in conjunction with below post_imp_detection_enabled

post_imp_percentage_protected

integer

post impression percentage Protected

0 - 100

use in conjunction with below post_imp_detection_enabled

post_imp_percentage_forensiq

integer

post impression percentage ForensIQ

0 - 100

use in conjunction with below post_imp_detection_enabled

pre_bid_blocking_enabled

boolean

pre-bid filtering active

true / false

 

pre_bid_blocking_components

array string

pre-bid filtering providers

["springserve",  "whiteops", "protected"]

specify percentages using post_imp_percentage for providers

key_ids

array integer

KVPs included in reporting

[2102, 3124]

max 15 reporting keys per router

note

string

notes

"notes about router"

 

min_aspect_ratio

string

min aspect ratio as float

"0.563"

9:16 (0.56)

max_aspect_ratio

string

max aspect ratio as float

"1.777"

16:9 (1.78)

format

string

ad format type

"video" / "tile" / "audio"

 

third_party_overrides

boolean

 

 

n/a

player_sizes

array integer

player size targeting

["xs", "s", "m", "l", "xl", "u"]

  • X-Small (< 250px)

  • Small (250-349)

  • Med (350-500)

  • Large (501-799)

  • X-Large (≥ 800)

  • Unknown

user_agent_devices

array string

allowed device targeting

["Computer", "Mobile Web", "Mobile In-app", "Tablet Web", "Tablet In-app", "Games Console", "CTV", "Set-top Box", "Other"]

[] - empty array targets all devices

user_agent_brands

array string

allowed device brand targeting

["Samsung", "Philips", "Panasonic", "Hisense", "Vizio", "Sanyo", "Magnavox", "Android TV", "LG", "Comcast", "Other Connected TV", "Apple TV", "Roku", "Fire TV", "Chromecast", "Smartcast by Vizio"]

[] - empty array targets all brands

user_agent_operating_systems

array string

allowed OS targeting

["Android", "iOS", "Linux", "Windows", "Mac OS X", "Chrome OS", "Fire OS", "Xbox OS", "VIZIO SmartCast", "Tizen", "Roku OS", "webOS TV", "Other"]

[] - empty array targets all operating systems

user_agent_browsers

array string

allow browser targeting

["Chrome", "Edge", "Firefox", "Safari", "IE", "Chromium", "Chrome Mobile", "WebView", "Android", "Samsung Browser", "Facebook on Android", "Facebook on iOS", "Mobile Safari", "Roku App"]

[] - empty array targets all browsers

segment_targeting_enabled

boolean

audience segment targeting active

true / false

use in conjunction with segment_groups

segment_groups

array object

audience segment targeting groups and types

[

        {

            "id": 28839,

            "group": "1",

            "white_list": true,

            "segment_group_type": "segments",

            "segment_ids": [

                10869,

                10004

            ],

            "partner_segment_ids": []

        }

]

use multiple groups for OR targeting and same group for AND targeting.

"whitelist": true/false, for allow or block user segments

blocking_unknown_advertiser_domains

boolean

toggle to block unknown advertiser domains

 

Blocks all SSHB and Open Market demand tags that don't return an Advertiser Domain in the VAST response

country_source

string

country targeting source

"list" / "values"

use in conjunction with either country_list_ids if value is "lists" or country_codes if value is "values"

country_list_ids

array integer

ID of country lists 

[184]

use in conjunction with country_source with value "lists".

country_white_list

boolean

country targeting include / exclude

true (include) / false (exclude)

true -

false -

country_codes

array string

country code

["UK", "US", "IT"]

ISO 3166 Alpha-2 codes

metro_area_source

string

Metro Area targeting source

"list" / "values"

use in conjunction with either country_list_ids if value is "lists" or country_codes if value is "values"

metro_area_list_ids

array integer

ID of Metro Area lists

[199]

use in conjunction with country_source with value "lists".

metro_area_white_list

boolean

Metro Area targeting include / exclude

true / false

true - include

false - exclude

metro_area_codes

array integer

Metro Area ID

[525]

 

targeted_iab_category_white_list

boolean

IAB tier 1 targeting active

true (allowlist) / false (blocklist) / null (all categories)

 

targeted_iab_categories

array string

IAB tier 1 category name

["Automotive"]

IAB content taxonomy download

targeted_iab_tier2_categories_white_list

boolean

IAB tier 2 targeting active

true (allowlist) / false (blocklist) / null (all categories)

 

targeted_iab_tier2_category

array string

IAB tier 2 category name

["Auto Body Styles", "Automotive"]

IAB content taxonomy download

dnt_values

array string

DNT (do not track) targeting

["true", "false", "empty"]

 

dnt_param_required