Page tree


Request

Open RTB 2.4 is recommended, however OpenRTB 2.3 may also be used. Use version number 24 or 23 respectively.

Request URI (for GET and POST)

https://hb.pubmatic.com/openrtb/{version number}

Sample Request

https://hb.pubmatic.com/openrtb/24

Refer to HTTP Request Parameters & HTTP Header Parameters

Sample Request Body


{
    "id": "1471504048821",
    "at": 2,
    "cur": ["USD"],
    "imp": [{
        "id": "1471504048821_0",
        "banner": {
            "pos": 0,
            "format": [{
                "w": 728,
                "h": 90
            }]
        },
        "ext": {
            "extension": {
                "div": "",
                "adunit": "DMDemo",
                "slotIndex":"1",       
                "keyValue": {
                    "pos": ["high_impact", "DMDemo@728x90"]
                }
            }
        }
    }, {
        "id": "1471504048821_1",
        "banner": {
            "pos": 0,
            "format": [{
                "w": 300,
                "h": 250
            }]
        },
        "ext": {
            "extension": {
                "div": "",
                "adunit": "DMDemo1",
                "key-value": {
                    "pos": ["high_impact", "DMDemo1@300x250"]
                }
            }
        }
    }, {
        "id": "1471504048821_2",
        "banner": {
            "pos": 0,
            "format": [{
                "w": 728,
                "h": 90
            }]
        },
        "ext": {
            "extension": {
                "div": "",
                "adunit": "DMDemo2",
                "key-value": {
                    "pos": ["high_impact", "DMDemo2@728x90"]
                }
            }
        }
    }],
    "site": {
        "domain": "172.16.4.36",
        "page": "http://publisherpage.com",
        "publisher": {
            "id": "5890"
        }
    },
    "device": {
        "ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36",
        "ip": "123.145.167.10"
    },
    "user": {
        "gender": "M",
        "yob": 1989
    },
    "regs": {
        "coppa": 0
    },
    "ext": {
        "extension": {
            "dm": {
                "rs": 1,
                "a": "1",
                "pm_cb": "buzz",
                "kval_param": "key1=value1,value2;key2=value3;key3=value4"
            },
            "as": {
                "SAVersion": "1000",
                "kltstamp": "2016-8-18 12:37:28",
                "timezone": 5.5,
                "screenResolution": "1366x768",
                "ranreq": 0.35227230576370405,
                "pageURL": "http://publisherpage.com",
                "inIframe": "0",
                "kadpageurl": "http://publisherpage.com"
                "keywords": "entertainment,sports",
                "cat": "IAB1-1,IAB1-7",
                "api": "3%3A%3A4%3A%3A5",
                "nettype": "wifi",
                "loc": "18.75,73.59",
            }
        }
    }
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


Sample DM Standard Request

In the process of supporting traditional DM requests with the new aggregator, PubMatic has revised the request format for the DM Standard endpoint. This is the existing OpenRTB 2.4 Request Object with an added extension at the impression level to hold the adunit, div and key-values. The following is a sample request. 

{
 "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22",
 "at": 1,
 "cur": ["USD"],
 "imp": [{
 "id": "1",
 "bidfloor": 0.03,
 "banner": {
 "pos": 0,
 "format": [{
 "h": 250,
 "w": 300
 },
 {
 "h": 600,
 "w": 300
 }]
 }
 "ext": {
 "div": "div-123456", // OPTIONAL
 "adunit": "/1234/homepage",
 "key-value": {
 "amznslots": ["0"],
 "referrer": ["false"],
 "pgtype": ["index"]
 }
 }
 }],
 "site": {
 "domain": "www.sampledomain.com",
 "page": "http://www.sampledomain.com/1234.html ",
 "publisher": {
 "id": "8953"
 }
 },
 "device": {
 "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13
 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"
 },
 "ext": {
 "extension": {
 "profileid": "0",
 "versionid": "0",
 "response_type": 1 // 1: Legacy async and ';' separated
 }
 }

}‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

    

HTTP GET

In the GET Request, all parameters are passed in the request URL. The entire OpenRTB JSON  in UTF encoded format is passed as a parameter in the request.


Request: hb.pubmatic.com/openrtb/24?json={encoded format as a parameter in the request}


Sample Request


hb.pubmatic.com/openrtb/24?json=%7B%0A%09%22id%22%3A%20%221471504048821%22%2C%0A%09%22at%22%3A%202%2C%0A%09%22cur%22%3A%20%5B%22USD%22%5D%2C%0A%09%22imp%22%3A%20%5B%7B%0A%09%09%22id%22%3A%20%221471504048821_0%22%2C%0A%09%09%22banner%22%3A%20%7B%0A%09%09%09%22pos%22%3A%200%2C%0A%09%09%09%22format%22%3A%20%5B%7B%0A%09%09%09%09%22w%22%3A%20728%2C%0A%09%09%09%09%22h%22%3A%2090%0A%09%09%09%7D%5D%0A%09%09%7D%2C%0A%09%09%22ext%22%3A%20%7B%0A%09%09%09%22extension%22%3A%20%7B%0A%09%09%09%09%22div%22%3A%20%22%22%2C%0A%09%09%09%09%22adunit%22%3A%20%22DMDemo%22%2C%0A%09%09%09%09%22slotIndex%22%3A%221%22%2C%09%09%0A%09%09%09%09%22key-value%22%3A%20%7B%0A%09%09%09%09%09%22pos%22%3A%20%5B%22high_impact%22%2C%20%22DMDemo%40728x90%22%5D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%2C%20%7B%0A%09%09%22id%22%3A%20%221471504048821_1%22%2C%0A%09%09%22banner%22%3A%20%7B%0A%09%09%09%22pos%22%3A%200%2C%0A%09%09%09%22format%22%3A%20%5B%7B%0A%09%09%09%09%22w%22%3A%20300%2C%0A%09%09%09%09%22h%22%3A%20250%0A%09%09%09%7D%5D%0A%09%09%7D%2C%0A%09%09%22ext%22%3A%20%7B%0A%09%09%09%22extension%22%3A%20%7B%0A%09%09%09%09%22div%22%3A%20%22%22%2C%0A%09%09%09%09%22adunit%22%3A%20%22DMDemo1%22%2C%0A%09%09%09%09%22key-value%22%3A%20%7B%0A%09%09%09%09%09%22pos%22%3A%20%5B%22high_impact%22%2C%20%22DMDemo1%40300x250%22%5D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%2C%20%7B%0A%09%09%22id%22%3A%20%221471504048821_2%22%2C%0A%09%09%22banner%22%3A%20%7B%0A%09%09%09%22pos%22%3A%200%2C%0A%09%09%09%22format%22%3A%20%5B%7B%0A%09%09%09%09%22w%22%3A%20728%2C%0A%09%09%09%09%22h%22%3A%2090%0A%09%09%09%7D%5D%0A%09%09%7D%2C%0A%09%09%22ext%22%3A%20%7B%0A%09%09%09%22extension%22%3A%20%7B%0A%09%09%09%09%22div%22%3A%20%22%22%2C%0A%09%09%09%09%22adunit%22%3A%20%22DMDemo2%22%2C%0A%09%09%09%09%22key-value%22%3A%20%7B%0A%09%09%09%09%09%22pos%22%3A%20%5B%22high_impact%22%2C%20%22DMDemo2%40728x90%22%5D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%5D%2C%0A%09%22site%22%3A%20%7B%0A%09%09%22domain%22%3A%20%22172.16.4.36%22%2C%0A%09%09%22page%22%3A%20%22http%3A%2F%2F172.16.4.36%2FssWrapperTest.html%22%2C%0A%09%09%22publisher%22%3A%20%7B%0A%09%09%09%22id%22%3A%20%225890%22%0A%09%09%7D%0A%09%7D%2C%0A%09%22device%22%3A%20%7B%0A%09%09%22ua%22%3A%20%22Mozilla%2F5.0%20(X11%3B%20Linux%20x86_64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F52.0.2743.82%20Safari%2F537.36%22%2C%0A%09%09%22ip%22%3A%20%22123.145.167.10%22%0A%09%7D%2C%0A%09%22user%22%3A%20%7B%0A%09%09%22gender%22%3A%20%22M%22%2C%0A%09%09%22yob%22%3A%201989%0A%09%7D%2C%0A%09%22regs%22%3A%20%7B%0A%09%09%22coppa%22%3A%200%0A%09%7D%2C%0A%09%22ext%22%3A%20%7B%0A%09%09%22extension%22%3A%20%7B%0A%09%09%09%22dm%22%3A%20%7B%0A%09%09%09%09%22rs%22%3A%201%2C%0A%09%09%09%09%22a%22%3A%20%221%22%2C%0A%09%09%09%09%22pm_cb%22%3A%20%22buzz%22%2C%0A%09%09%09%09%22kval_param%22%3A%20%22key1%3Dvalue1%2Cvalue2%3Bkey2%3Dvalue3%3Bkey3%3Dvalue4%22%0A%09%09%09%7D%2C%0A%09%09%09%22as%22%3A%20%7B%0A%09%09%09%09%22SAVersion%22%3A%20%221000%22%2C%0A%09%09%09%09%22kltstamp%22%3A%20%222016-8-18%2012%3A37%3A28%22%2C%0A%09%09%09%09%22timezone%22%3A%205.5%2C%0A%09%09%09%09%22screenResolution%22%3A%20%221366x768%22%2C%0A%09%09%09%09%22ranreq%22%3A%200.35227230576370405%2C%0A%09%09%09%09%22pageURL%22%3A%20%22http%253A%252F%252F172.16.4.36%252FssWrapperTest.html%22%2C%0A%09%09%09%09%22refurl%22%3A%20%22%22%2C%0A%09%09%09%09%22inIframe%22%3A%20%220%22%2C%0A%09%09%09%09%22kadpageurl%22%3A%20%22http%253A%252F%252F172.16.4.36%252FssWrapperTest.html%22%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%7D


Server to Server Header Bidding Documentation

PubMatic Server-Side Wrapper Tag Overview 

Server to Server Wrapper Tag: Request Body 

Server to Server Wrapper Tag: Response Parameters & Sample 

HTTP Header Parameters 

HTTP Request Parameters