Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Table of Contents

...

Code Block
In [1]: tag = springserve.supply_tags.get(28852)

In [2]: tag.name = "I want to change the name"

In [3]: changed = tag.save()


In [4]: changed.ok
Out [4]: True

In [5]: print changed.name

"I want to change the name"

Note that when enabling post_imp_detection, you must also set at least one of post_imp_percentage_whiteops, post_imp_percentage_moat, post_imp_percentage_ias to >0 before saving your changes.

REST API

PUT /api/v0/supply_tags/<id>

...

Code Block
{    
"id": 123456, 
"account_id": 1,
	... 
"demand_tag_priorities": {        
	"demand_tag_id": 2345,        
    "demand_tag_id": 883061,
    "priority": 1,
    "tier": 1,
    "locked": false,
    "ratio": null,
    "slot_number": null,
    "slot_order": null
        }
    ...
}  

...

NOTE: Enabling Open Market in the API without specifying bidders will add all eligible bidders.

Adding Event Pixels to a Supply Tag

SDK

Code Block
In [1]: import springserve

In [2]: tag = springserve.supply_tags.get(123456)

In [3]: tag.tag_pixels = [{'pixel_type':'AdImpression', 'pixel_url':'https://springserve.com/', 
		'pixel_format':'image'}]

In [4]: saved_tag = tag.save()

In [5]: print saved_tag.ok, saved_tag.tag_pixels
True, [{'id': 244, 'pixel_type': 'AdImpression', 'pixel_url': 'https://springserve.com/', 
		'pixel_format': 'image', 'created_at': '2021-03-19T14:30:06.675Z'}]

...