{"_id":"57ab87c5b5e8742000e17e9e","user":"5429becb1163360800ed31f8","__v":36,"version":{"_id":"5429beef1163360800ed31fd","__v":22,"project":"5429beef1163360800ed31fa","createdAt":"2014-09-29T20:19:59.904Z","releaseDate":"2014-09-29T20:19:59.904Z","categories":["5429beef1163360800ed31fe","55e74e1f5d36b32b002563fa","55e7500a73169617001f2e86","55e76b8196131b2f00bf4b72","55e89569cdbb8a350096df9c","55f8935eb089b71700a8364e","55f8a67d3bb4bb0d0022d093","55f9dbefc7ef770d00d9bf6d","5601c21a22ecf60d002b27b3","5601c21ff12aee0d001bb06e","5601c2256c7b610d00280db5","5601c22c22ecf60d002b27b4","5603738d0c78b00d0039af47","5626f70bfcbbc621004ebf52","566f7a1ae144ab0d00e9732f","566f85ca7820960d00c3b93d","56708ce43a32d20d00c45cbf","56708d436995210d003aad8e","5736471abe10a9200030732c","57a82c7aff9bd30e00a6f1c1","591b8500e3992319007190f4","5a3718305c66a60012d960ba"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"parentDoc":null,"project":"5429beef1163360800ed31fa","githubsync":"","category":{"_id":"55e76b8196131b2f00bf4b72","pages":["55e8b2c13fef5017000dbd9a","55e8b365f0f1850d00d24a5b","55f88ebd5840d119004346bf","55f8ab55c449610d002daf87","5603759a8d58900d0051e9ee","560375cd90ee490d004403da","5633b5ebc49a7c19001fd091","567353ae47f7010d005bfdc9"],"project":"5429beef1163360800ed31fa","__v":8,"version":"5429beef1163360800ed31fd","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-02T21:34:57.232Z","from_sync":false,"order":2,"slug":"apis","title":"Integrating with APIs"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-10T20:00:05.975Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"language":"json","code":"{\n    \"status\": \"OK\",\n    \"count\": 1,\n    \"ad\": {\n        \"promotedByUrl\": \"\",\n        \"trackingTags\": \"<img src=\\\"http://bevo.adsnative.com/im.gif?sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\\\" BORDER=0 WIDTH=1 HEIGHT=1>\\n\",\n        \"ctaTitle\": \"\",\n        \"summary\": \"Test\",\n        \"videoExperience\": \"autoplay_inview\",\n        \"promotedBy\": \"Test\",\n        \"video\": {\n            \"sources\": [\n                \"http://static.adsnative.com/media/videos/blank.mp4\"\n            ],\n            \"experience\": \"autoplay_inview\",\n            \"vastTags\": [\n                \"http://dsp.videostat.com/giantmedia/vast?fid=6011&adid=5624&pid=855&sd=businessinsider.sg&sid=1921&pos=1&at=552\"\n            ],\n            \"embedType\": \"vast\",\n            \"trackingUrls\": {\n                \"duration\": {\n                    \"percentage\": {\n                        \"25\": [\n                            \"http://bevo.adsnative.com/vv.gif?tag_name=duration_25&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n                        ],\n                        \"50\": [\n                            \"http://bevo.adsnative.com/vv.gif?tag_name=duration_50&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n                        ],\n                        \"75\": [\n                            \"http://bevo.adsnative.com/vv.gif?tag_name=duration_75&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n                        ]\n                    },\n                    \"complete\": [\n                        \"http://bevo.adsnative.com/vv.gif?tag_name=duration_complete&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n                    ]\n                },\n                \"impression\": [\n                    \"http://bevo.adsnative.com/vv.gif?tag_name=impression&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n                ],\n                \"userActions\": {\n                    \"unmute\": [],\n                    \"fullscreen\": [],\n                    \"pause\": [],\n                    \"resume\": [],\n                    \"mute\": []\n                },\n                \"clickThrough\": [\n                    \"http://bevo.adsnative.com/vv.gif?tag_name=click&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n                ],\n                \"view\": [\n                    \"http://bevo.adsnative.com/vv.gif?tag_name=view&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n                ]\n            }\n        },\n        \"target\": \"_blank\",\n        \"title\": \"Test\",\n        \"url\": \"http://bevo.adsnative.com/ck?url=http%3A%2F%2Fnytimes.com&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\",\n      \t\"privacy\": {\n          \"advertiserPolicyUrl\": \"https://advertiser.com/privacy-policy/\",\n          \"clientRendered\": true,\n          \"iconUrl\": \"https://some.com/icon.png\",\n          \"imageHeight\": 32,\n          \"imageWidth\": 32,\n          \"policyUrl\": \"https://publisher.com/privacy-policy/\"\n       },\n        \"trackingUrls\": {\n            \"impressions\": [\n                \"http://bevo.adsnative.com/im.gif?sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n            ],\n            \"viewables\": [\n                \"http://bevo.adsnative.com/vi.gif?sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n            ],\n            \"clicks\": [\n                \"http://bevo.adsnative.com/ck?nr=1&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n            ],\n            \"actions\": {\n                \"action\": [\n                    \"http://bevo.adsnative.com/ca.gif?action_name=action&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\"\n                ]\n            }\n        },\n        \"landingUrl\": \"http://nytimes.com\",\n        \"ctaUrl\": null,\n        \"viewableTags\": \"<img src=\\\"http://bevo.adsnative.com/vi.gif?sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\\\" BORDER=0 WIDTH=1 HEIGHT=1>\\n\",\n        \"imageSrc\": \"/media/nw-13/c4c20aba-f3b2-43a4-a125-601bf615a5e4.png\",\n        \"promotedByTag\": \"Promoted by\",\n        \"backgroundColor\": \"#FFFFFF\",\n        \"sid\": \"8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\",\n        \"brandImageUrl\": \"\",\n        \"embedUrl\": \"http://api.adsnative.com/v1/creative.html?crid=ST481LGW&sid=8d384809050a4d9c9b27167fbdebe45e_a6ba41d5\",\n        \"type\": \"video\"\n    },\n    \"cid\": \"Y565P12K\",\n    \"crid\": \"ST481LGW\",\n    \"zid\": \"ping\",\n    \"sid\": \"8d384809050a4d9c9b27167fbdebe45e\",\n    \"uuid\": \"79f872ea-2a95-4edc-b49d-9448185a9034\",\n    \"ecpm\": 5.2\n}","name":"","status":200},{"status":500,"language":"json","code":"{\n    \"status\": \"Internal Server Error\",\n    \"code\": \"500\",\n    \"description\": \"Something is broken. We are looking into it!\"\n}","name":""},{"name":"No campaigns found","status":200,"language":"json","code":"{\n    \"status\": \"FAIL\",\n    \"message\": \"no campaigns found\",\n    \"uuid\": \"e3b50f82-f570-44d0-8c17-638059c9edf2\"\n}"},{"code":"{\n    \"status\": \"FAIL\",\n    \"message\": \"creating adzone mapping\",\n    \"uuid\": \"49227878-d21a-47cd-83cb-434d1b535d99\"\n}","language":"json","name":"Dynamic Placement is being created","status":200}]},"settings":"","examples":{"codes":[{"name":"APP with zid","code":"{\n    \"app\": {\n        \"app_id\" : \"demo_app\",\n      \t\"ver\": \"1.0\",\n        \"bnid\" : \"com.democompany.appdemo\",\n        \"store_id\": \"102323235\"\n    },\n    \"device\": {\n        \"ua\": \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A405 Safari/600.1.4\",\n        \"ip\": \"69.125.199.79\",\n        \"h\" : 150,\n        \"w\" : 200,\n        \"ort\" : \"v\",\n        \"ct\" : \"LTE\",\n        \"carrier\" : \"verizon\",\n        \"al\" : \"en-us\"\n    },\n    \"geo\": {\n        \"lat\": -20.555652,\n      \t\"lon\": 45.527344,\n      \t\"lla\": 10\n    },\n    \"user\": {\n        \"uuid\": \"68753A44-4D6F-1226-9C60-0050E4C00067\",\n      \t\"idfa\": \"68753A44-4D6F-1226-9C60-0050E4C00067\",\n        \"age\": 29,\n        \"gender\": \"m\",\n  \t\t\t\"dnt\" : false\n    },\n  \t\"ck\": {\n    \t\t\"tags\": [\"sports\", \"baseball\"],\n      \t\"age\": [\"25\"]\n    },\n    \"zid\": \"eayh1ApaOSjr4CZqzFmpwH1fNHGdbTRs9K40DXhq\",\n    \"fetch_num\": 1,\n    \"s2s_tracking\": false,\n    \"hb\": true,\n}","language":"json"},{"code":"{\n    \"app\": {\n    \t\"app_name\": \"test_app\",\n        \"app_id\" : \"test_app\",\n        \"ver\": \"1.0\",\n        \"bnid\" : \"com.democompany.appdemo\",\n        \"store_id\": \"102323235\"\n    },\n    \"device\": {\n        \"ua\": \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A405 Safari/600.1.4\",\n        \"ip\": \"69.125.199.79\",\n        \"h\" : 150,\n        \"w\" : 200,\n        \"ort\" : \"v\",\n        \"ct\" : \"LTE\",\n        \"carrier\" : \"verizon\",\n        \"al\" : \"en-us\"\n    },\n    \"geo\": {\n        \"lat\": -20.555652,\n        \"lon\": 45.527344,\n        \"lla\": 10\n    },\n    \"user\": {\n        \"uuid\": \"68753A44-4D6F-1226-9C60-0050E4C00067\",\n        \"idfa\": \"68753A44-4D6F-1226-9C60-0050E4C00067\",\n        \"age\": 29,\n        \"gender\": \"m\",\n        \"dnt\" : false\n    },\n    \"fetch_num\": 1,\n    \"s2s_tracking\": false,\n    \"network_key\": \"jajkskjas99021hjsaj092109\",\n    \"widget_ids\": [\"test_widget\"],\n    \"cat\": [\"IAB1\"],\n    \"hb\": true\n}","language":"json","name":"APP with network_key and widget_ids"},{"name":"Site with network_key and widget_ids","language":"json","code":"{\n    \"site\": {\n    \t\t\"url\": \"https://pocket.com/article-url\",\n      \t\"ref\": \"https://google.com\"\n    },\n    \"device\": {\n        \"ua\": \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A405 Safari/600.1.4\",\n        \"ip\": \"69.125.199.79\"\n    },\n    \"user\": {\n        \"uuid\": \"68753A44-4D6F-1226-9C60-0050E4C00067\",\n        \"idfa\": \"68753A44-4D6F-1226-9C60-0050E4C00067\",\n        \"age\": 29,\n        \"gender\": \"m\",\n        \"dnt\" : false\n    },\n    \"fetch_num\": 1,\n    \"s2s_tracking\": false,\n    \"network_key\": \"jajkskjas99021hjsaj092109\",\n    \"widget_ids\": [\"test_widget\"],\n    \"cat\": [\"IAB1\"],\n    \"hb\": true\n}"},{"name":"Site with zid","language":"json","code":"{\n    \"site\": {\n    \t\t\"url\": \"https://pocket.com/article-url\",\n      \t\"ref\": \"https://google.com\"\n    },\n    \"device\": {\n        \"ua\": \"Mozilla/5.0 (iPhone; CPU iPhone OS 8_0_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12A405 Safari/600.1.4\",\n        \"ip\": \"69.125.199.79\",\n        \"h\" : 150,\n        \"w\" : 200,\n        \"al\" : \"en-us\"\n    },\n    \"user\": {\n        \"uuid\": \"68753A44-4D6F-1226-9C60-0050E4C00067\",\n        \"idfa\": \"68753A44-4D6F-1226-9C60-0050E4C00067\",\n        \"age\": 29,\n        \"gender\": \"m\",\n        \"dnt\" : false\n    },\n    \"fetch_num\": 1,\n    \"s2s_tracking\": false,\n    \"zid\": \"ping\",\n    \"hb\": true\n}"}]},"method":"post","auth":"required","params":[{"_id":"582c4badb2bed80f0086e14b","ref":"","in":"body","required":false,"desc":"Details of the app making this request. Required for an app","default":"","type":"object","name":"app"},{"_id":"5b6b781211aaba0003379b77","ref":"","in":"body","required":false,"desc":"Details of the site object. See below for details. Required for desktop or mobile web requests.","default":"","type":"object","name":"site"},{"_id":"582c4badb2bed80f0086e14a","ref":"","in":"body","required":true,"desc":"Details of the device from this request is coming","default":"","type":"object","name":"device"},{"_id":"582c4badb2bed80f0086e149","ref":"","in":"body","required":true,"desc":"Geo details of the request","default":"","type":"object","name":"geo"},{"_id":"582c4badb2bed80f0086e148","ref":"","in":"body","required":true,"desc":"Details of the user accessing your app while making this request","default":"","type":"object","name":"user"},{"_id":"582c4badb2bed80f0086e147","ref":"","in":"body","required":false,"desc":"This is the ad placement id that can be fetch from your dashboard as shown here : https://dev.getpolymorph.com/docs/publisher-faqs#4-how-to-get-placement-id-","default":"","type":"string","name":"zid"},{"_id":"5b6b762c087afa000352efaf","ref":"","in":"body","required":false,"desc":"In case of dynamic placement creation pass your account wide network_key. Required if you are choosing to not pass `zid`","default":"","type":"string","name":"network_key"},{"_id":"5b6b762c087afa000352efae","ref":"","in":"body","required":false,"desc":"List of widget_ids. Widget ID is publisher generated unique value to create a unique placement in Polymorph system behind the scenes. Required if passing `network_key` instead of `zid`. Polymorph creates unique placement behind the scenes for each 'App Name/Site Domain' + 'Widget ID' combination.","default":"","type":"array_string","name":"widget_ids"},{"_id":"5857b0359988d00f0055062e","ref":"","in":"body","required":false,"desc":"Number of ads to be returned by API","default":"","type":"int","name":"fetch_num"},{"_id":"5857b0359988d00f0055062d","ref":"","in":"body","required":false,"desc":"To enable/disable server-side impression & click tracking","default":"","type":"boolean","name":"s2s_tracking"},{"_id":"5b313ef52a1ebe000331d012","ref":"","in":"body","required":false,"desc":"If this a \"header bidding\" integration where downstream there another auction that will be conducted, in that case pass 'true'/'1' value so First Price CPM value is returned so it can be used for header bidding integration.","default":"","type":"boolean","name":"hb"},{"_id":"5b6b781211aaba0003379b76","ref":"","in":"body","required":false,"desc":"IAB Category codes for current forum/site. Heres the full list - https://gist.github.com/thiagozs/6732050 (Currently only top level of IAB category codes are supported). For example “IAB1” for “Arts & Entertainment”. Required for `network_key` and `widget_ids` approach.","default":"","type":"array_string","name":"cat"},{"_id":"5b6b7a6cc9344c00032e742f","ref":"","in":"body","required":false,"desc":"a unique key for the placement template that needs to be used for this ad request. Usually provided by your Polymorph Account Manager. Please note that this `template_key` is effective only for this ad request and will not update corresponding placement.","default":"","type":"string","name":"template_key"},{"_id":"5b6b7a6cc9344c00032e742e","ref":"","in":"body","required":false,"desc":"Floor price in decimals to be used for a current ad request. This overrides any floor set in your account in Polymorph console and is used only for the current ad request. Please consult with your Polymorph Account Manager before using this parameter.","default":"","type":"float","name":"floor"},{"_id":"5b7d84228460dc0003511c4f","ref":"","in":"body","required":false,"desc":"An object with 'Key' as the key (as configured in console) and value as array of string of values. Please see the below example for usage","default":"","type":"object","name":"ck"}],"url":"/v1/ad.json"},"isReference":true,"order":1,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request Parameters - Individual Object Parameters\"\n}\n[/block]\n**App Object Parameters**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Required?\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"app_name\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Yes\",\n    \"0-3\": \"Application Name\",\n    \"2-0\": \"store_id\",\n    \"2-1\": \"String\",\n    \"2-2\": \"No\",\n    \"2-3\": \"Store id, itunes_id in case iOS\",\n    \"3-0\": \"ver\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Yes\",\n    \"3-3\": \"Application version\",\n    \"4-0\": \"bnid\",\n    \"4-1\": \"String\",\n    \"4-2\": \"Yes\",\n    \"4-3\": \"Bundle ID\",\n    \"1-0\": \"app_id\",\n    \"1-1\": \"String\",\n    \"1-2\": \"No\",\n    \"1-3\": \"Application ID\"\n  },\n  \"cols\": 4,\n  \"rows\": 5\n}\n[/block]\n**Site Object Parameters** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Required?\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"url\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Yes\",\n    \"0-3\": \"current URL of the page\",\n    \"1-0\": \"ref\",\n    \"1-1\": \"String\",\n    \"1-2\": \"No\",\n    \"1-3\": \"referral URL of the current page\"\n  },\n  \"cols\": 4,\n  \"rows\": 2\n}\n[/block]\n**Device Object Parameters** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Required?\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"ua\",\n    \"1-0\": \"ip\",\n    \"2-0\": \"h\",\n    \"3-0\": \"w\",\n    \"4-0\": \"ort\",\n    \"5-0\": \"ct\",\n    \"6-0\": \"carrier\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Yes\",\n    \"0-3\": \"User Agent\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Yes\",\n    \"1-3\": \"User's IP address\",\n    \"2-1\": \"Int\",\n    \"3-1\": \"Int\",\n    \"4-1\": \"String\",\n    \"5-1\": \"String\",\n    \"6-1\": \"String\",\n    \"2-2\": \"No\",\n    \"3-2\": \"No\",\n    \"2-3\": \"Height of device display in pixels\",\n    \"3-3\": \"Width of device display in pixels\",\n    \"4-2\": \"No\",\n    \"4-3\": \"Orientation. \\\"v\\\" for vertical, \\\"h\\\" for horizontal\",\n    \"5-3\": \"Connection type. Accepted values are wifi, 5g, lte, 4g, 3g, 2g\",\n    \"6-3\": \"Carrier Name\",\n    \"5-2\": \"No\",\n    \"6-2\": \"No\",\n    \"7-0\": \"al\",\n    \"7-1\": \"String\",\n    \"7-2\": \"No\",\n    \"7-3\": \"Language setting e.g 'en-us'\"\n  },\n  \"cols\": 4,\n  \"rows\": 8\n}\n[/block]\n**Geo Object Parameters** \n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"lat\",\n    \"1-0\": \"lon\",\n    \"2-0\": \"lla\",\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Required?\",\n    \"h-3\": \"Description\",\n    \"0-1\": \"Float\",\n    \"1-1\": \"Float\",\n    \"2-1\": \"Float\",\n    \"0-2\": \"No\",\n    \"1-2\": \"No\",\n    \"2-2\": \"No\",\n    \"0-3\": \"Latitude of the device\",\n    \"1-3\": \"Longitude of the device\",\n    \"2-3\": \"Location accuracy\"\n  },\n  \"cols\": 4,\n  \"rows\": 3\n}\n[/block]\n**User Object Parameters** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Required?\",\n    \"h-3\": \"Description\",\n    \"0-0\": \"uuid\",\n    \"1-0\": \"idfa\",\n    \"2-0\": \"gaid\",\n    \"3-0\": \"dnt\",\n    \"0-1\": \"String\",\n    \"0-2\": \"Yes\",\n    \"0-3\": \"Universal unique ID. Pass idfa or gaid when available, otherwise pass a **uuid** generated by the app to allow things like cookie syncing, frequency capping, unique ads rotation, etc.\\n\\nFor desktop s2s integration you can pass a publisher generated `uuid` as long as its unique per user.\\n\\nPass this value as 00000000-0000-0000-0000-000000000000 if you won't want this user to be tracked or alternative pass `dnt=true`.\",\n    \"1-3\": \"Id sanctioned for advertiser use (if sending request from iOS devices)\",\n    \"2-3\": \"Id sanctioned for advertiser use (if sending request from android devices)\",\n    \"1-2\": \"Required for iOS\",\n    \"2-2\": \"Required for Android\",\n    \"3-2\": \"No\",\n    \"1-1\": \"String\",\n    \"2-1\": \"String\",\n    \"3-1\": \"Boolean\",\n    \"3-3\": \"If user has chosen “Do Not Track”. Default value: false\"\n  },\n  \"cols\": 4,\n  \"rows\": 4\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response Parameters\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Response Meta Values\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"status\",\n    \"0-1\": \"The status of the ad response. Returns ‘OK’ when a valid ad is present.\",\n    \"1-0\": \"count\",\n    \"1-1\": \"The number of native ads returned.\",\n    \"2-0\": \"cid\",\n    \"2-1\": \"A unique token for the returned campaign\",\n    \"3-0\": \"crid\",\n    \"3-1\": \"A unique token for the returned creative\",\n    \"4-0\": \"zid\",\n    \"4-1\": \"Placement id/key for the current placement\",\n    \"5-0\": \"sid\",\n    \"5-1\": \"A unique id for the current session. You'll notice that all the tracking urls are assigned with this session id.\",\n    \"6-0\": \"uuid\",\n    \"6-1\": \"A unique id assigned to the user. Generally same as what was passed as an argument. When the argument is not passed then a random value is assigned and can be retained by the cookies in the headers (if supported).\",\n    \"7-0\": \"ecpm\",\n    \"7-1\": \"First price CPM value for the current bid. This value is returned only when `hb=1`\"\n  },\n  \"cols\": 2,\n  \"rows\": 8\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Ad Object\"\n}\n[/block]\nThese are the parameters from ad object in response\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"content type of the ad. Possible values today are,\\n\\\"story\\\": This represents simple text and image based native ad,\\n\\\"lead_gen\\\": Any lead generation based native ad, \\n\\\"video\\\": Any video based native ad, \\n\\\"app_install\\\": Any app install based native ad, \\n\\\"banner\\\": Any banner ad\\n\\\"video_outstream\\\": Video only ad\\n\\nNOTE : \\\"lead_gen\\\" and \\\"app_install\\\" types are direct campaigns only, not marketplace\",\n    \"1-1\": \"title of the native ad.\",\n    \"0-0\": \"type\",\n    \"1-0\": \"title\",\n    \"2-1\": \"summary part of the native ad.\",\n    \"2-0\": \"summary\",\n    \"3-0\": \"imageSrc\",\n    \"4-0\": \"video\",\n    \"5-0\": \"url\",\n    \"6-0\": \"target\",\n    \"7-0\": \"backgroundColor\",\n    \"8-0\": \"brandImageUrl\",\n    \"9-0\": \"promotedBy\",\n    \"10-0\": \"promotedByTag\",\n    \"11-0\": \"promotedByUrl\",\n    \"12-0\": \"trackingTags\",\n    \"3-1\": \"URL of the image attached with native ad.\",\n    \"4-1\": \"Returns the video object to with all the asset details. Please refer to table 1.1 for details\",\n    \"5-1\": \"click URL for the whole native ad.\",\n    \"6-1\": \"after click action for the native ad. If it’s ‘_blank’, it should be opened in new window/view. If it’s ‘_parent’ or empty, it should be opened in the same window/view.\",\n    \"7-1\": \"Background color value set in Polymorph Dashboard for the ad unit. This allows you to control the background color of the ad unit from Polymorph Dashboard. You can choose to ignore this value\",\n    \"8-1\": \"URL of the brand image/logo.\",\n    \"9-1\": \"Name of the brand promoting the content.\",\n    \"10-1\": \"Prefix for the brand name configured in Polymorph Dashboard for the current ad unit. For e.g. ‘Promoted by’ or ‘Sponsored by’.\",\n    \"11-1\": \"click URL that needs to be called in case user clicks on either brand name or brand image.\",\n    \"12-1\": \"tags for tracking impression and third-party tracking. These are typically image or script tags that can droppped anywhere in the web page or in case of native platforms, within a 1x1 Web View. If you are looking for an alternative method for your platform, please contact Polymorph team for more options.\",\n    \"13-0\": \"viewableTags\",\n    \"13-1\": \"tags for tracking viewability according to MRC50 standards\",\n    \"14-0\": \"html\",\n    \"14-1\": \"In case of \\\"banner\\\" ad type, this parameter returns the final html to be rendered\",\n    \"15-0\": \"trackingUrls\",\n    \"15-1\": \"Tracking URLs or 1x1 pixel urls for each events such as impression, click, viewability and custom events configured for your account. Either these tracking URLs or above tags (trackingTags and viewableTags) need to be fired for respective events as and when they occur. Tracking URLs can be fired server-to-server as well.\",\n    \"16-1\": \"privacy object contains links for privacy policy and icon that should be displayed to end user along with the ad. Typically it's recommended to show this at top right corner of the ad. Following are the fields,\\n\\n1. policyUrl: This is the primary policy url that needs to be presented to the user. It can be publisher's privacy policy. In case publisher's privacy policy is not configured then advertiser's privacy policy is presented here.\\n2. iconUrl: This is url of the icon that needs to be presented on the ad which will display privacy policy link to the user.\\n3. imageWidth & imageHeight: It's the height and width of the above iconUrl\\n4. advertiserPolicyUrl: It's the privacy policy url returned by the advertiser. When this is present publisher is required to show both privacyUrl (publisher's privacy policy) and 4. advertiserPolicyUrl to the end user. Check for advertiserPolicyUrl != privacyUrl before you present both privacy policies.\\n5. clientRendered (boolean): This indicated whether the rendering of the privacy policy needs to be handled by client who is integrating this API.\",\n    \"16-0\": \"privacy\"\n  },\n  \"cols\": 2,\n  \"rows\": 17\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Video Object (ad.video)\"\n}\n[/block]\nIn case ad is a video, you'll be getting following video ad object in response\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"sources\",\n    \"h-0\": \"Parameter\",\n    \"h-1\": \"Data type\",\n    \"0-1\": \"Array of strings\",\n    \"0-2\": \"List of transcoded video URLs for various video formats such as .mp4, .ogg, .webm. Typically .mp4 file always present and other formats are optionally provided depending on the setup.\",\n    \"1-0\": \"experience\",\n    \"1-1\": \"String\",\n    \"1-2\": \"Video experience that needs to be implemented. Possible values currently,\\n1. 'click_to_play': Allow users to initiate the video play\\n2. 'autoplay_inview': Play the video on mute when video is in user's viewport. Unmute when user fullscreens or hover's the cursor over the video and mute when its out of fullscreen. Video should pause when video is out of viewport.\",\n    \"2-0\": \"vastTags\",\n    \"2-1\": \"Array of strings\",\n    \"2-2\": \"List of VAST urls\",\n    \"3-0\": \"embedType\",\n    \"3-1\": \"String\",\n    \"3-2\": \"Type of the video. Possible values,\\n1. \\\"native\\\": In this case it returns transcoded video URLs in 'sources'\\n2. \\\"youtube\\\": In this case ad server returns youtube video URL in the 'sources'\\n3. \\\"iframe\\\": In this case ad server returns iframe embed url.\",\n    \"4-0\": \"trackingUrls\",\n    \"4-1\": \"Object\",\n    \"4-2\": \"This returns set of tracking URLs which needs to be fired on various events. Please refer to Table 1.1.1 for details\",\n    \"h-2\": \"Description\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Video Tracking object (ad.video.tracking)\"\n}\n[/block]\nIn addition to above video ad object, you'll get following tracking object to track video ads. Typically a GET request needs to be made for individual tracking URLs on respective events \n[block:parameters]\n{\n  \"data\": {\n    \"h-2\": \"Description\",\n    \"h-1\": \"Data Type\",\n    \"h-0\": \"Parameter\",\n    \"0-0\": \"duration\",\n    \"0-1\": \"object\",\n    \"0-2\": \"It returns various tracking URLs which need be fired when user has completed certain duration of the video. \\n1. \\\"complete\\\": Fired when video is completed\\n2. \\\"percentage\\\": Fired when certain percentage of video is completed\\n3. \\\"time\\\": Fired when certain time duration (in seconds) of video is completed\",\n    \"1-0\": \"impression\",\n    \"1-1\": \"Array of strings\",\n    \"1-2\": \"Fired when video is simply loaded on to the page\",\n    \"2-0\": \"clickThrough\",\n    \"2-1\": \"Array of strings\",\n    \"2-2\": \"Fired when user clicks on the video\",\n    \"3-0\": \"view\",\n    \"3-1\": \"Array of string\",\n    \"3-2\": \"Fired as soon as video starts playing\",\n    \"4-0\": \"userActions\",\n    \"4-1\": \"Object\",\n    \"4-2\": \"It returns various tracking URLs which need be fired when user takes various actions,\\n1. \\\"mute\\\": when user initiates mute on video\\n2. \\\"mute\\\": when user unmutes the video\\n3. \\\"fullscreen\\\": when user makes the video fullscreen\\n4. \\\"pause\\\": when user pauses the video\\n5. \\\"resume\\\": when user resumes the video.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Cookie syncing\"\n}\n[/block]\nIf you are doing an S2S integration on the desktop platforms as opposed to mobile apps where there is a well-defined Advertiser ID for each user such as IDFA or GAID, you will have to do a cookie syncing integration on the client side i.e. user's browser so we can sync the `uuid` passed in the above s2s API request with all the buyers we've integrated with. This is an important and mandatory step if you are integrating with the programmatic demand offered by Polymorph. \n\nThe integration if very simple. Embed the following JS code in the same webpage where the ad would be shown,\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<!-- Polymorph Cookie Sync Code START -->\\n<script type=\\\"text/javascript\\\" src=\\\"https://static.adsnative.com/static/js/cookie-sync.js\\\"></script>\\n<script>\\n    window.CookieSync.init([PUB_UUID], [PUBLISHER_NETWORK_KEY]);\\n</script>\\n<!-- Polymorph Cookie Sync Code END -->\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nReplace `[PUB_UUID]` with the same `uuid` you'd be passing for that user for above s2s API request. This `uuid` has to be unique per user and consistent across all Polymorph API requests. Also replace `[PUBLISHER_NETWORK_KEY]` with the `network_key` provided for your account by Polymorph. Both of these fields are mandatory. \n\n**Note**: If user has chosen to be not tracked or under GDPR hasn't opted in to be tracked. Please pass `00000000-0000-0000-0000-000000000000` as `uuid` or you can skip to embed the above script in those cases.","excerpt":"This API is same as Ads API (web). It has the same endpoint too. However, native apps running on iOS, Android, Apple TV etc. need additional parameters that can be passed in an API call. Also, they need additional meta-data in the response to be able to do necessary ad stitching, especially for video formats. \n\nPlease note, the final ad stitching and rendering of the video is done at the client side.","slug":"ads-api-native-apps","type":"endpoint","title":"Ads API"}

postAds API

This API is same as Ads API (web). It has the same endpoint too. However, native apps running on iOS, Android, Apple TV etc. need additional parameters that can be passed in an API call. Also, they need additional meta-data in the response to be able to do necessary ad stitching, especially for video formats. Please note, the final ad stitching and rendering of the video is done at the client side.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

app:
object
Details of the app making this request. Required for an app
site:
object
Details of the site object. See below for details. Required for desktop or mobile web requests.
device:
required
object
Details of the device from this request is coming
geo:
required
object
Geo details of the request
user:
required
object
Details of the user accessing your app while making this request
zid:
string
This is the ad placement id that can be fetch from your dashboard as shown here : https://dev.getpolymorph.com/docs/publisher-faqs#4-how-to-get-placement-id-
network_key:
string
In case of dynamic placement creation pass your account wide network_key. Required if you are choosing to not pass `zid`
widget_ids:
array of strings
List of widget_ids. Widget ID is publisher generated unique value to create a unique placement in Polymorph system behind the scenes. Required if passing `network_key` instead of `zid`. Polymorph creates unique placement behind the scenes for each 'App Name/Site Domain' + 'Widget ID' combination.
fetch_num:
integer
Number of ads to be returned by API
s2s_tracking:
boolean
To enable/disable server-side impression & click tracking
hb:
boolean
If this a "header bidding" integration where downstream there another auction that will be conducted, in that case pass 'true'/'1' value so First Price CPM value is returned so it can be used for header bidding integration.
cat:
array of strings
IAB Category codes for current forum/site. Heres the full list - https://gist.github.com/thiagozs/6732050 (Currently only top level of IAB category codes are supported). For example “IAB1” for “Arts & Entertainment”. Required for `network_key` and `widget_ids` approach.
template_key:
string
a unique key for the placement template that needs to be used for this ad request. Usually provided by your Polymorph Account Manager. Please note that this `template_key` is effective only for this ad request and will not update corresponding placement.
floor:
float
Floor price in decimals to be used for a current ad request. This overrides any floor set in your account in Polymorph console and is used only for the current ad request. Please consult with your Polymorph Account Manager before using this parameter.
ck:
object
An object with 'Key' as the key (as configured in console) and value as array of string of values. Please see the below example for usage

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Request Parameters - Individual Object Parameters" } [/block] **App Object Parameters** [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Required?", "h-3": "Description", "0-0": "app_name", "0-1": "String", "0-2": "Yes", "0-3": "Application Name", "2-0": "store_id", "2-1": "String", "2-2": "No", "2-3": "Store id, itunes_id in case iOS", "3-0": "ver", "3-1": "String", "3-2": "Yes", "3-3": "Application version", "4-0": "bnid", "4-1": "String", "4-2": "Yes", "4-3": "Bundle ID", "1-0": "app_id", "1-1": "String", "1-2": "No", "1-3": "Application ID" }, "cols": 4, "rows": 5 } [/block] **Site Object Parameters** [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Required?", "h-3": "Description", "0-0": "url", "0-1": "String", "0-2": "Yes", "0-3": "current URL of the page", "1-0": "ref", "1-1": "String", "1-2": "No", "1-3": "referral URL of the current page" }, "cols": 4, "rows": 2 } [/block] **Device Object Parameters** [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Required?", "h-3": "Description", "0-0": "ua", "1-0": "ip", "2-0": "h", "3-0": "w", "4-0": "ort", "5-0": "ct", "6-0": "carrier", "0-1": "String", "0-2": "Yes", "0-3": "User Agent", "1-1": "String", "1-2": "Yes", "1-3": "User's IP address", "2-1": "Int", "3-1": "Int", "4-1": "String", "5-1": "String", "6-1": "String", "2-2": "No", "3-2": "No", "2-3": "Height of device display in pixels", "3-3": "Width of device display in pixels", "4-2": "No", "4-3": "Orientation. \"v\" for vertical, \"h\" for horizontal", "5-3": "Connection type. Accepted values are wifi, 5g, lte, 4g, 3g, 2g", "6-3": "Carrier Name", "5-2": "No", "6-2": "No", "7-0": "al", "7-1": "String", "7-2": "No", "7-3": "Language setting e.g 'en-us'" }, "cols": 4, "rows": 8 } [/block] **Geo Object Parameters** [block:parameters] { "data": { "0-0": "lat", "1-0": "lon", "2-0": "lla", "h-0": "Field", "h-1": "Type", "h-2": "Required?", "h-3": "Description", "0-1": "Float", "1-1": "Float", "2-1": "Float", "0-2": "No", "1-2": "No", "2-2": "No", "0-3": "Latitude of the device", "1-3": "Longitude of the device", "2-3": "Location accuracy" }, "cols": 4, "rows": 3 } [/block] **User Object Parameters** [block:parameters] { "data": { "h-0": "Field", "h-1": "Type", "h-2": "Required?", "h-3": "Description", "0-0": "uuid", "1-0": "idfa", "2-0": "gaid", "3-0": "dnt", "0-1": "String", "0-2": "Yes", "0-3": "Universal unique ID. Pass idfa or gaid when available, otherwise pass a **uuid** generated by the app to allow things like cookie syncing, frequency capping, unique ads rotation, etc.\n\nFor desktop s2s integration you can pass a publisher generated `uuid` as long as its unique per user.\n\nPass this value as 00000000-0000-0000-0000-000000000000 if you won't want this user to be tracked or alternative pass `dnt=true`.", "1-3": "Id sanctioned for advertiser use (if sending request from iOS devices)", "2-3": "Id sanctioned for advertiser use (if sending request from android devices)", "1-2": "Required for iOS", "2-2": "Required for Android", "3-2": "No", "1-1": "String", "2-1": "String", "3-1": "Boolean", "3-3": "If user has chosen “Do Not Track”. Default value: false" }, "cols": 4, "rows": 4 } [/block] [block:api-header] { "type": "basic", "title": "Response Parameters" } [/block] [block:api-header] { "title": "Response Meta Values" } [/block] [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-0": "status", "0-1": "The status of the ad response. Returns ‘OK’ when a valid ad is present.", "1-0": "count", "1-1": "The number of native ads returned.", "2-0": "cid", "2-1": "A unique token for the returned campaign", "3-0": "crid", "3-1": "A unique token for the returned creative", "4-0": "zid", "4-1": "Placement id/key for the current placement", "5-0": "sid", "5-1": "A unique id for the current session. You'll notice that all the tracking urls are assigned with this session id.", "6-0": "uuid", "6-1": "A unique id assigned to the user. Generally same as what was passed as an argument. When the argument is not passed then a random value is assigned and can be retained by the cookies in the headers (if supported).", "7-0": "ecpm", "7-1": "First price CPM value for the current bid. This value is returned only when `hb=1`" }, "cols": 2, "rows": 8 } [/block] [block:api-header] { "title": "Ad Object" } [/block] These are the parameters from ad object in response [block:parameters] { "data": { "h-0": "Parameter", "h-1": "Description", "0-1": "content type of the ad. Possible values today are,\n\"story\": This represents simple text and image based native ad,\n\"lead_gen\": Any lead generation based native ad, \n\"video\": Any video based native ad, \n\"app_install\": Any app install based native ad, \n\"banner\": Any banner ad\n\"video_outstream\": Video only ad\n\nNOTE : \"lead_gen\" and \"app_install\" types are direct campaigns only, not marketplace", "1-1": "title of the native ad.", "0-0": "type", "1-0": "title", "2-1": "summary part of the native ad.", "2-0": "summary", "3-0": "imageSrc", "4-0": "video", "5-0": "url", "6-0": "target", "7-0": "backgroundColor", "8-0": "brandImageUrl", "9-0": "promotedBy", "10-0": "promotedByTag", "11-0": "promotedByUrl", "12-0": "trackingTags", "3-1": "URL of the image attached with native ad.", "4-1": "Returns the video object to with all the asset details. Please refer to table 1.1 for details", "5-1": "click URL for the whole native ad.", "6-1": "after click action for the native ad. If it’s ‘_blank’, it should be opened in new window/view. If it’s ‘_parent’ or empty, it should be opened in the same window/view.", "7-1": "Background color value set in Polymorph Dashboard for the ad unit. This allows you to control the background color of the ad unit from Polymorph Dashboard. You can choose to ignore this value", "8-1": "URL of the brand image/logo.", "9-1": "Name of the brand promoting the content.", "10-1": "Prefix for the brand name configured in Polymorph Dashboard for the current ad unit. For e.g. ‘Promoted by’ or ‘Sponsored by’.", "11-1": "click URL that needs to be called in case user clicks on either brand name or brand image.", "12-1": "tags for tracking impression and third-party tracking. These are typically image or script tags that can droppped anywhere in the web page or in case of native platforms, within a 1x1 Web View. If you are looking for an alternative method for your platform, please contact Polymorph team for more options.", "13-0": "viewableTags", "13-1": "tags for tracking viewability according to MRC50 standards", "14-0": "html", "14-1": "In case of \"banner\" ad type, this parameter returns the final html to be rendered", "15-0": "trackingUrls", "15-1": "Tracking URLs or 1x1 pixel urls for each events such as impression, click, viewability and custom events configured for your account. Either these tracking URLs or above tags (trackingTags and viewableTags) need to be fired for respective events as and when they occur. Tracking URLs can be fired server-to-server as well.", "16-1": "privacy object contains links for privacy policy and icon that should be displayed to end user along with the ad. Typically it's recommended to show this at top right corner of the ad. Following are the fields,\n\n1. policyUrl: This is the primary policy url that needs to be presented to the user. It can be publisher's privacy policy. In case publisher's privacy policy is not configured then advertiser's privacy policy is presented here.\n2. iconUrl: This is url of the icon that needs to be presented on the ad which will display privacy policy link to the user.\n3. imageWidth & imageHeight: It's the height and width of the above iconUrl\n4. advertiserPolicyUrl: It's the privacy policy url returned by the advertiser. When this is present publisher is required to show both privacyUrl (publisher's privacy policy) and 4. advertiserPolicyUrl to the end user. Check for advertiserPolicyUrl != privacyUrl before you present both privacy policies.\n5. clientRendered (boolean): This indicated whether the rendering of the privacy policy needs to be handled by client who is integrating this API.", "16-0": "privacy" }, "cols": 2, "rows": 17 } [/block] [block:api-header] { "type": "basic", "title": "Video Object (ad.video)" } [/block] In case ad is a video, you'll be getting following video ad object in response [block:parameters] { "data": { "0-0": "sources", "h-0": "Parameter", "h-1": "Data type", "0-1": "Array of strings", "0-2": "List of transcoded video URLs for various video formats such as .mp4, .ogg, .webm. Typically .mp4 file always present and other formats are optionally provided depending on the setup.", "1-0": "experience", "1-1": "String", "1-2": "Video experience that needs to be implemented. Possible values currently,\n1. 'click_to_play': Allow users to initiate the video play\n2. 'autoplay_inview': Play the video on mute when video is in user's viewport. Unmute when user fullscreens or hover's the cursor over the video and mute when its out of fullscreen. Video should pause when video is out of viewport.", "2-0": "vastTags", "2-1": "Array of strings", "2-2": "List of VAST urls", "3-0": "embedType", "3-1": "String", "3-2": "Type of the video. Possible values,\n1. \"native\": In this case it returns transcoded video URLs in 'sources'\n2. \"youtube\": In this case ad server returns youtube video URL in the 'sources'\n3. \"iframe\": In this case ad server returns iframe embed url.", "4-0": "trackingUrls", "4-1": "Object", "4-2": "This returns set of tracking URLs which needs to be fired on various events. Please refer to Table 1.1.1 for details", "h-2": "Description" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Video Tracking object (ad.video.tracking)" } [/block] In addition to above video ad object, you'll get following tracking object to track video ads. Typically a GET request needs to be made for individual tracking URLs on respective events [block:parameters] { "data": { "h-2": "Description", "h-1": "Data Type", "h-0": "Parameter", "0-0": "duration", "0-1": "object", "0-2": "It returns various tracking URLs which need be fired when user has completed certain duration of the video. \n1. \"complete\": Fired when video is completed\n2. \"percentage\": Fired when certain percentage of video is completed\n3. \"time\": Fired when certain time duration (in seconds) of video is completed", "1-0": "impression", "1-1": "Array of strings", "1-2": "Fired when video is simply loaded on to the page", "2-0": "clickThrough", "2-1": "Array of strings", "2-2": "Fired when user clicks on the video", "3-0": "view", "3-1": "Array of string", "3-2": "Fired as soon as video starts playing", "4-0": "userActions", "4-1": "Object", "4-2": "It returns various tracking URLs which need be fired when user takes various actions,\n1. \"mute\": when user initiates mute on video\n2. \"mute\": when user unmutes the video\n3. \"fullscreen\": when user makes the video fullscreen\n4. \"pause\": when user pauses the video\n5. \"resume\": when user resumes the video." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "title": "Cookie syncing" } [/block] If you are doing an S2S integration on the desktop platforms as opposed to mobile apps where there is a well-defined Advertiser ID for each user such as IDFA or GAID, you will have to do a cookie syncing integration on the client side i.e. user's browser so we can sync the `uuid` passed in the above s2s API request with all the buyers we've integrated with. This is an important and mandatory step if you are integrating with the programmatic demand offered by Polymorph. The integration if very simple. Embed the following JS code in the same webpage where the ad would be shown, [block:code] { "codes": [ { "code": "<!-- Polymorph Cookie Sync Code START -->\n<script type=\"text/javascript\" src=\"https://static.adsnative.com/static/js/cookie-sync.js\"></script>\n<script>\n window.CookieSync.init([PUB_UUID], [PUBLISHER_NETWORK_KEY]);\n</script>\n<!-- Polymorph Cookie Sync Code END -->", "language": "html" } ] } [/block] Replace `[PUB_UUID]` with the same `uuid` you'd be passing for that user for above s2s API request. This `uuid` has to be unique per user and consistent across all Polymorph API requests. Also replace `[PUBLISHER_NETWORK_KEY]` with the `network_key` provided for your account by Polymorph. Both of these fields are mandatory. **Note**: If user has chosen to be not tracked or under GDPR hasn't opted in to be tracked. Please pass `00000000-0000-0000-0000-000000000000` as `uuid` or you can skip to embed the above script in those cases.