Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 2.18 KB

cookieSync.md

File metadata and controls

55 lines (42 loc) · 2.18 KB

Starting Cookie Syncs

This endpoint is used during cookie syncs. For technical details, see the Cookie Sync developer docs.

POST /cookie_sync

Sample Request

This returns a set of URLs to enable cookie syncs across bidders. (See Prebid.js documentation?) The request must supply a JSON object to define the list of bidders that may need to be synced.

{
    "bidders": ["appnexus", "rubicon"],
    "gdpr": 1,
    "gdpr_consent": "BONV8oqONXwgmADACHENAO7pqzAAppY",
    "limit": 2
}

bidders is optional. If present, it limits the endpoint to return syncs for bidders defined in the list.

gdpr is optional. It should be 1 if GDPR is in effect, 0 if not, and omitted if the caller is unsure.

gdpr_consent is required if gdpr is 1, and optional otherwise. If present, it should be an unpadded base64-URL encoded Vendor Consent String.

If gdpr is omitted, callers are still encouraged to send gdpr_consent if they have it. Depending on how the Prebid Server host company has configured their servers, they may or may not require it for cookie syncs.

limit is optional. If present and greater than zero, it will limit the number of syncs returned to limit, dropping some syncs to get the count down to limit if more would otherwise have been returned. This is to facilitate clients not overloading a user with syncs the first time they are encountered.

If the bidders field is an empty list, it will not supply any syncs. If the bidders field is omitted completely, it will attempt to sync all bidders.

Sample Response

This will return a JSON object that will allow the client to request cookie syncs with bidders that still need to be synced:

{
    "status": "ok",
    "bidder_status": [
        {
            "bidder": "appnexus",
            "usersync": {
                "url": "someurl.com",
                "type": "redirect",
                "supportCORS": false
            }
        }
    ]
}