{"_id":"56cbad69c675f50b00a4b881","category":{"_id":"56c7bab4606ee717003c4766","project":"56c35c56c0c4630d004e864c","__v":18,"pages":["56c7c193f9aa3b0d00c8458f","56cb80a4c675f50b00a4b826","56cb83859f4ae20b00644f1f","56cb853a245b841300806f82","56cb863c32011d2500681925","56cb88a4245b841300806f8b","56cb9915245b841300806fa7","56cb9a079f4ae20b00644f48","56cb9b5bc675f50b00a4b859","56cba5929f4ae20b00644f5d","56cba5c5d5c6241d00ef5e93","56cbab9c9f4ae20b00644f76","56cbad69c675f50b00a4b881","56cbb060d5c6241d00ef5ebb","56cf3c4d6c5d7a13005ee88c","56cf3d0e287eb20b009f9ec7","56cf3d7c5267d70b00494c42","56cf3ee0287eb20b009f9ecd"],"version":"56c35c56c0c4630d004e864f","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-20T01:00:36.607Z","from_sync":false,"order":0,"slug":"buzz-concepts","title":"Buzz Concepts"},"user":"56c39c05bc41330d009f25d7","githubsync":"","parentDoc":null,"project":"56c35c56c0c4630d004e864c","version":{"_id":"56c35c56c0c4630d004e864f","project":"56c35c56c0c4630d004e864c","__v":8,"createdAt":"2016-02-16T17:28:54.864Z","releaseDate":"2016-02-16T17:28:54.864Z","categories":["56c35c57c0c4630d004e8650","56c7b9e5379b311700ed8fe3","56c7bab4606ee717003c4766","56c7bb3613e5400d001e8cbd","56cf3f5a5267d70b00494c4b","56cf3f866c5d7a13005ee894","56fd3956caad892200847bce","599da256e7742b002588bb02"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.5.0","version":"0.5"},"__v":1,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-23T00:52:57.040Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"As described in more detail in [Creatives, Creative Assets, Templates, Rules](doc:creatives-creative-assets-templates-rules), Buzz allows you to associate [Creative Assets](doc:creative-assets) with [Creative Templates](doc:creativetemplates) and does its best to render those assets into the right places in the templates without everything being finely specified by the API user. This document briefly explains the logic used for these associations. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"How Do Rendering Keys Work?\"\n}\n[/block]\nThe `rendering_key` is a field in the Creative Template object that tells Buzz how to associate assets with this template. For example, a Flash creative requires at least one SWF file and one image file (for backup) by setting the `rendering_key` to `FLASH` it tells Buzz to look for these types of files.\n\nWhen you create a Creative and wish to take advantage of this rendering logic, you pass one or more unique ids for Creative Assets into the `creative_assets` field of the Creative. If the POST is successful, the `creative_content` field of the Creative will automatically be filled with the proper JSON for completing the template.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Rendering Key Overview\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Rendering Key\",\n    \"h-1\": \"Assets Expected in POST\",\n    \"h-2\": \"Validation Logic\",\n    \"0-0\": \"`NONE`\",\n    \"0-1\": \"None\",\n    \"0-2\": \"None\",\n    \"1-0\": \"`IMAGE`\",\n    \"1-1\": \"A single asset with a mime-type of `image/<whatever>`\",\n    \"1-2\": \"No more than one asset, must be an image mime-type\",\n    \"2-0\": \"`FLASH`\",\n    \"2-1\": \"Two or more assets, at least one of which must be a SWF and one of which must have a mime-type of `image/<whatever>`\",\n    \"2-2\": \"At least one of each type must be passed. If multiple SWFs or images are passed, the last one in the list is used\",\n    \"3-0\": \"`VAST`\",\n    \"3-1\": \"One Video Asset, with completed transcoding of one or more additional assets\",\n    \"3-2\": \"The original video is not used in the template, just the transcoded versions. The versions must match those included in the template, and are identified by their filename/extension as being `swf`, `flv` or `webm`\",\n    \"4-0\": \"`VPAID`\",\n    \"4-1\": \"One Video Asset, with completed transcoding of one or more additional assets\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Matching Creative Assets with Rendering Keys\"\n}\n[/block]\nYou can use a special view to return a list of available Creative Templates for a given mime-type:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X GET \\\"[host]/rest/creative_template\\\" -b cookies.txt -d '{\\\"mime_type\\\":\\\"application/x-shockwave-flash\\\", \\\"view_name\\\":\\\"creative_template_mime_type_view\\\"}'\",\n      \"language\": \"curl\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"creative-types-and-rendering-keys","type":"basic","title":"Creative Types and Rendering Keys"}

Creative Types and Rendering Keys


As described in more detail in [Creatives, Creative Assets, Templates, Rules](doc:creatives-creative-assets-templates-rules), Buzz allows you to associate [Creative Assets](doc:creative-assets) with [Creative Templates](doc:creativetemplates) and does its best to render those assets into the right places in the templates without everything being finely specified by the API user. This document briefly explains the logic used for these associations. [block:api-header] { "type": "basic", "title": "How Do Rendering Keys Work?" } [/block] The `rendering_key` is a field in the Creative Template object that tells Buzz how to associate assets with this template. For example, a Flash creative requires at least one SWF file and one image file (for backup) by setting the `rendering_key` to `FLASH` it tells Buzz to look for these types of files. When you create a Creative and wish to take advantage of this rendering logic, you pass one or more unique ids for Creative Assets into the `creative_assets` field of the Creative. If the POST is successful, the `creative_content` field of the Creative will automatically be filled with the proper JSON for completing the template. [block:api-header] { "type": "basic", "title": "Rendering Key Overview" } [/block] [block:parameters] { "data": { "h-0": "Rendering Key", "h-1": "Assets Expected in POST", "h-2": "Validation Logic", "0-0": "`NONE`", "0-1": "None", "0-2": "None", "1-0": "`IMAGE`", "1-1": "A single asset with a mime-type of `image/<whatever>`", "1-2": "No more than one asset, must be an image mime-type", "2-0": "`FLASH`", "2-1": "Two or more assets, at least one of which must be a SWF and one of which must have a mime-type of `image/<whatever>`", "2-2": "At least one of each type must be passed. If multiple SWFs or images are passed, the last one in the list is used", "3-0": "`VAST`", "3-1": "One Video Asset, with completed transcoding of one or more additional assets", "3-2": "The original video is not used in the template, just the transcoded versions. The versions must match those included in the template, and are identified by their filename/extension as being `swf`, `flv` or `webm`", "4-0": "`VPAID`", "4-1": "One Video Asset, with completed transcoding of one or more additional assets" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Matching Creative Assets with Rendering Keys" } [/block] You can use a special view to return a list of available Creative Templates for a given mime-type: [block:code] { "codes": [ { "code": "curl -X GET \"[host]/rest/creative_template\" -b cookies.txt -d '{\"mime_type\":\"application/x-shockwave-flash\", \"view_name\":\"creative_template_mime_type_view\"}'", "language": "curl" } ] } [/block]