Supply Tag API




Creating a Supply Tag

SDK

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

Note that for flat waterfalls, the tier parameter defaults to 1. Same goes for any demand tag included in demand_tag_priorities that does not specify the tier parameter.

REST API

POST /api/v0/supply_tags

Headers

Body (example)

{
   "name": "TEST API DOCS",
   "rate": 0.02
}

Required parameters: name, rate

Response

Status code 200




Get a Supply Tag

SDK

REST API

GET /api/v0/supply_tags/<id>

Headers

Response

Status code 200

Edit a Supply Tag

SDK

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>

Headers

Body (example)

{
    "name": "I want to change the name"
}

Response

Status code 200

Adding Demand to a Supply Tag

SDK

REST API

PUT  /api/v0/supply_tags/<id>

Headers

Content-Type application/json

Authorization "yourAuthToken"

Body (example)

{

"demand_tag_priorities":  [{"demand_tag_id": 2345}]

}

Response

Status code 200

Duplicate a Supply Tag

Please note that this works for both Managed and Direct Connect tags. 

SDK

REST API

GET /api/v0/supply_tags/<id>/duplicate

Headers

Response

Status code 200

Create a Direct Connect Supply Tag

SDK

Note that for flat waterfalls, the tier parameter defaults to 1. Same goes for any demand tag included in demand_tag_priorities that does not specify the tier parameter.

REST API

POST /api/v0/connected_supply

Headers

Body (example)

{
   "name": "TEST API DC",
   "direct_connect":true,
   "supply_partner_id":10000,
   "rate": 0,
   "demand_tag_priorities":[{"demand_tag_id":30424, "priority":1}]
}


Required parameters: name, demand_tag_priorities, supply_partner_id, direct_connect, rate

Response

Status code 200

Enabling a Supply Tag for Open Market

SDK

REST API

PATCH /api/v0/supply_tags/<id>

Headers

Body (example)

{
    "open_market_enabled": "True"
}

Response

Status code 200

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

Adding Event Pixels to a Supply Tag

SDK

The fields for 'pixel_type' are the following:

   Impression: 'AdImpression'
   Start: 'AdVideoStart'
   1st Quartile: 'AdVideoFirstQuartile'
   Midpoint: 'AdVideoMidpoint'
   3rd Quartile: 'AdVideoThirdQuartile'
   Complete: 'AdVideoComplete'
   Click: 'AdClickThru'

Fields for 'pixel_format':

   Image URL: 'image'
   Javascript URL: 'js'

REST API

PATCH /api/v0/supply_tags/<id>

Headers

Body (example)

{
    "tag_pixels": [{pixel_type":"AdImpression", "pixel_url":"https://springserve.com/", "pixel_format":"image"}]

}

Response

Status code 200

Adding Open Market Bidders to a Supply Tag

SDK

The 'other_account_id' represents the bidder account id to add to the open market for this supply tag. There's an optional 'openrtb_floor' field that allows you to set a specific floor for a bidder (otherwise, the default Open Market floor is used). 

REST API

PATCH /api/v0/supply_tags/<id>

Headers

Body (example)

{
    "open_market_external_bidders": [{"other_account_id": 4}, {"other_account_id": 27, "openrtb_floor" : 12.0}]

}

Response

Status code 200

Adding Pods to a Supply Tag

SDK

Max_unfilled_slots is initially null, you can set it to an integer between 0 and 2

To EDIT a pod you have to add the pod id to the request

REST API

PUT  /api/v0/supply_tags/<id>

Headers

Content-Type application/json

Authorization "yourAuthToken"

Body (example)

{

"pod":{

      "max_duration": 200,

      "custom_ad_slot_duration": true,

      "unfilled_slot_opt_out_enabled": false,

      "max_unfilled_slots":0,

      "ad_slots": [{"position": 3, "min_duration":40, "max_duration":60}, {"position": 2}, {"position": 1}]

}

}

Response

Status code 200