{"id":730,"date":"2020-12-22T14:53:59","date_gmt":"2020-12-22T14:53:59","guid":{"rendered":"https:\/\/wiki.pontiac.media\/?page_id=730"},"modified":"2021-12-08T15:08:30","modified_gmt":"2021-12-08T15:08:30","slug":"uploading-a-creative","status":"publish","type":"docs","link":"https:\/\/wiki.pontiac.media\/?docs=api\/api-remarketing-campaign-tutorial\/uploading-a-creative","title":{"rendered":"Uploading a Creative"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Here we are posing a small 11 kb image.<\/span><br \/>\n<span style=\"font-weight: 400;\">This image must be serialized using base64 encoding and passed into the field encodedRawCreative.<\/span><br \/>\n<span style=\"font-weight: 400;\">To encode an image you can use <\/span><a href=\"https:\/\/www.base64-image.de\/\"><span style=\"font-weight: 400;\">https:\/\/www.base64-image.de\/<\/span><\/a><span style=\"font-weight: 400;\"> or find a library for the language you are using to do it programmatically. There is an example in the python code that accompanies this tutorial<\/span><br \/>\n<span style=\"font-weight: 400;\">For this call you will see that you need to pass in the Advertiser ID when posting the Creative.<\/span><br \/>\n<span style=\"font-weight: 400;\">curl -X POST -H &#8216;auth:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjEwMDAsInVzZXJJZCI6NCwiZXhwaXJlcyI6IjIwMjAtMDgtMjUgMDI6Mjc6MTYifQ.JpVp62T-VEbuxquTXHXaKqhrqEIef1Hq3PpaRgExzrg&#8217; -d &#8216;{<\/span><br \/>\n<span style=\"font-weight: 400;\">&#8220;name&#8221;:&#8221;testSmallCreative&#8221;,<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400;\">&#8220;pontiacAdvertiserId&#8221;:1713,<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400;\">&#8220;creativeProperties&#8221;:{<\/span><br \/>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span> <span style=\"font-weight: 400;\">&#8220;clickURL&#8221;:&#8221;http:\/\/pontiac.media&#8221;,<\/span><br \/>\n<span style=\"font-weight: 400;\">&#8220;encodedRawCreative&#8221;:&#8221;\/9j\/4AAQSkZJRgABAQAAAQABAAD\/2wBDADIiJSwlHzIsKSw4NTI7S31RS0VFS5ltc1p9tZ++u7Kfr6zI4f\/zyNT\/16yv+v\/9\/\/\/\/\/\/\/\/wfD\/\/\/\/\/\/\/\/\/\/\/\/\/2wBDATU4OEtCS5NRUZP\/zq\/O\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/wAARCAD6ASwDAREAAhEBAxEB\/8QAGQABAQEBAQEAAAAAAAAAAAAAAAECAwQF\/8QANxABAAIBAwMDAwMDAwMDBQAAAQI&#8230;<br \/>\n<\/span>&#8230;JitQd8lVHIJtT57YEcKOBHAmAfvgPvgMCGFXAGRY0YIpkqxoxVjRkajZirGjJWo2ZKrcciV0MsRowjWCmEocnzlSqcn\/APTlSsvB8OWJWX\/bLGaw85qM1l4yxmsOEqPGEZcDDgjLzgR74WI4rUHIsRyERwI4UwRHAhyYB5cUMBgf\/9k=&#8221;,<br \/>\n&#8220;width&#8221;:300,<br \/>\n&#8220;height&#8221;:250<br \/>\n},<br \/>\n&#8220;status&#8221;:1,<br \/>\n&#8220;creativeType&#8221;:&#8221;image&#8221;<br \/>\n}\u2019 &#8216;https:\/\/api.pontiac.media\/pontiac\/creative?advertiser-id=1713&#8217;<br \/>\n<span style=\"font-weight: 400;\">(see full encoded Creative here: <a href=\"https:\/\/sec-wiki.pontiac.media\/wp-content\/uploads\/2020\/12\/Encoded-Creative.docx\">Encoded Creative<\/a>)<\/span><br \/>\n&nbsp;<br \/>\n<b>Response with the wrapper and read only fields:<\/b><br \/>\n<span style=\"font-weight: 400;\">{&#8220;timestamp&#8221;:&#8221;Mon Aug 24 19:03:28 UTC 2020&#8243;,&#8221;response&#8221;:{&#8220;Creatives&#8221;:[{&#8220;pontiacCreativeId&#8221;:28214,&#8221;seatId&#8221;:1000,&#8221;name&#8221;:&#8221;testSmallCreative&#8221;,&#8221;pontiacAdvertiserId&#8221;:1713,&#8221;creativeProperties&#8221;:{&#8220;clickURL&#8221;:&#8221;http:\/\/pontiac.media&#8221;,&#8221;thirdPartyPixelsIds&#8221;:[],&#8221;encodedRawCreative&#8221;:&#8221;\/9j\/4AAQSkZJRgABAQAAAQABAAD\/2wBDADIiJSwlHzIsKSw4NTI7S31RS0VFS5ltc1p9tZ++u7Kfr6zI4f\/zyNT\/16yv+v\/9\/\/\/\/\/\/\/\/wfD\/\/\/\/\/\/\/\/\/\/\/\/\/2wBDATU4OEtCS5NRUZP\/zq\/O\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/wAARCAD6ASwD&#8230;<br \/>\n&#8230;wI4UwRHAhyYB5cUMBgf\/9k=&#8221;,&#8221;width&#8221;:300,&#8221;height&#8221;:250,&#8221;segmentPixelIds&#8221;:[]},&#8221;status&#8221;:1,&#8221;auditData&#8221;:{&#8220;status&#8221;:&#8221;pending&#8221;},&#8221;creativeType&#8221;:&#8221;image&#8221;,&#8221;clickTracking&#8221;:0,&#8221;soonToExpire&#8221;:0,&#8221;isSensitive&#8221;:0,&#8221;categories&#8221;:[],&#8221;isMalicious&#8221;:0,&#8221;isUnusable&#8221;:0}]},&#8221;accountStatus&#8221;:1,&#8221;seatId&#8221;:1000}<br \/>\n<\/span><br \/>\n<span style=\"font-weight: 400;\">(see full Response here: <a href=\"https:\/\/sec-wiki.pontiac.media\/wp-content\/uploads\/2020\/12\/Response-.docx\">Response<\/a>)<\/span><br \/>\n&nbsp;<br \/>\n<span style=\"font-weight: 400;\">From this we will need the <\/span><b>pontiacCreativeId<\/b><span style=\"font-weight: 400;\">. We will pass this in when making the Line, in this example it is<\/span><b> 28214<\/b><span style=\"font-weight: 400;\">.<\/span><br \/>\n&nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":714,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-730","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=730"}],"version-history":[{"count":1,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/730\/revisions"}],"predecessor-version":[{"id":6467,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/730\/revisions\/6467"}],"up":[{"embeddable":true,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/714"}],"next":[{"title":"Posting Pixels","link":"https:\/\/wiki.pontiac.media\/?docs=api\/api-remarketing-campaign-tutorial\/posting-pixels","href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/736"}],"prev":[{"title":"Creating a New Advertiser","link":"https:\/\/wiki.pontiac.media\/?docs=api\/api-remarketing-campaign-tutorial\/creating-a-new-advertiser","href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=\/wp\/v2\/docs\/727"}],"wp:attachment":[{"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=730"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/wiki.pontiac.media\/index.php?rest_route=%2Fwp%2Fv2%2Fdoc_tag&post=730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}