{"_id":"56fd424227b4321900186f3c","parentDoc":null,"user":"56c39c05bc41330d009f25d7","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"},"category":{"_id":"56fd3956caad892200847bce","__v":0,"project":"56c35c56c0c4630d004e864c","version":"56c35c56c0c4630d004e864f","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-03-31T14:51:02.977Z","from_sync":false,"order":1,"slug":"buzz-json-objects","title":"Buzz JSON Objects"},"project":"56c35c56c0c4630d004e864c","__v":4,"updates":["58078149ad246319004d881d"],"next":{"pages":[],"description":""},"createdAt":"2016-03-31T15:29:06.297Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"Buzz supports the ability to bid on impressions using flexible \"bidding strategies\" that are implemented into the [Line Item](doc:line-items). Each Line Item has a single bidding field, in which the bidding strategy, and all required parameters for that strategy, are defined. A list of existing strategies is here: [List of Bidding Strategy Modules and Keys](doc:list-of-bidding-strategy-modules-and-keys).\n\nThe format for the bidding field is as follows:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"bidding_strategy\\\":<bidding_strategy_name>\\\",\\n \\t\\\"values\\\":{\\n  \\t\\\"<bidding_key1>\\\":<bidding_value1>,\\n  \\t\\\"<bidding_key2>\\\":<bidding_value2>\\n\\t},\\n \\t\\\"custom\\\":false\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\nFor example, if you want to set a static CPM bid of $1.21, use the \"CPM\" bidding strategy as follows:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"bidding_strategy\\\":\\\"cpm\\\",\\n \\t\\\"values\\\":\\n  \\t{\\n      \\\"cpm_bid\\\":1.21\\n    },\\n \\t\\\"pacing\\\":\\\"lifetime\\\",\\n \\t\\\"custom\\\":false\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"API Usage\"\n}\n[/block]\nLike Targeting or Creative Attributes, you can use the API to either validate bidding strategies with a POST, or get a list of fields for a bidding strategy, with a GET.  The API end point for bidding strategies including the `/bidding/` path is as follows:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl -X POST -b cookies.txt [host]/rest/bidding/cpm -d '{\\\"bidding_strategy\\\":\\\"cpm\\\",\\\"values\\\":{\\\"cpm_bid\\\":1.21},\\\"pacing\\\":\\\"none\\\"}'\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"JSON Structure\"\n}\n[/block]\nThe Creative Attributes JSON has the following fields:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Key\",\n    \"h-1\": \"Example value\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"key\",\n    \"0-1\": \"cpm_bid\",\n    \"0-2\": \"Keys are defined in the modules. For a list of modules and keys, see [List of Bidding Strategy Modules and Keys](doc:list-of-bidding-strategy-modules-and-keys).\",\n    \"1-0\": \"values\",\n    \"1-1\": \"1.12\",\n    \"1-2\": \"A value for the key. This can be an int, string, number, or array, depending on the key\\nUnlike Targeting or Creative Attributes, the value is not required to be in an array.\",\n    \"2-0\": \"custom\",\n    \"2-1\": \"false\",\n    \"2-2\": \"Used to indicate whether the bidding logic is on a Beeswax server or a custom algorithm. This field will generally be set automatically by the system and can be safely omitted.\",\n    \"3-0\": \"pacing\",\n    \"3-1\": \"lifetime\",\n    \"3-2\": \"If a bidding strategy can be paced, the `pacing` value can be set to `daily` or `lifetime`. If it cannot be paced, then it should be set to `none`\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]","excerpt":"","slug":"bidding-strategies","type":"basic","title":"Bidding Strategies"}

Bidding Strategies


Buzz supports the ability to bid on impressions using flexible "bidding strategies" that are implemented into the [Line Item](doc:line-items). Each Line Item has a single bidding field, in which the bidding strategy, and all required parameters for that strategy, are defined. A list of existing strategies is here: [List of Bidding Strategy Modules and Keys](doc:list-of-bidding-strategy-modules-and-keys). The format for the bidding field is as follows: [block:code] { "codes": [ { "code": "{\n \"bidding_strategy\":<bidding_strategy_name>\",\n \t\"values\":{\n \t\"<bidding_key1>\":<bidding_value1>,\n \t\"<bidding_key2>\":<bidding_value2>\n\t},\n \t\"custom\":false\n}", "language": "json" } ] } [/block] For example, if you want to set a static CPM bid of $1.21, use the "CPM" bidding strategy as follows: [block:code] { "codes": [ { "code": "{\n \"bidding_strategy\":\"cpm\",\n \t\"values\":\n \t{\n \"cpm_bid\":1.21\n },\n \t\"pacing\":\"lifetime\",\n \t\"custom\":false\n}", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "API Usage" } [/block] Like Targeting or Creative Attributes, you can use the API to either validate bidding strategies with a POST, or get a list of fields for a bidding strategy, with a GET. The API end point for bidding strategies including the `/bidding/` path is as follows: [block:code] { "codes": [ { "code": "curl -X POST -b cookies.txt [host]/rest/bidding/cpm -d '{\"bidding_strategy\":\"cpm\",\"values\":{\"cpm_bid\":1.21},\"pacing\":\"none\"}'", "language": "json" } ] } [/block] [block:api-header] { "type": "basic", "title": "JSON Structure" } [/block] The Creative Attributes JSON has the following fields: [block:parameters] { "data": { "h-0": "Key", "h-1": "Example value", "h-2": "Description", "0-0": "key", "0-1": "cpm_bid", "0-2": "Keys are defined in the modules. For a list of modules and keys, see [List of Bidding Strategy Modules and Keys](doc:list-of-bidding-strategy-modules-and-keys).", "1-0": "values", "1-1": "1.12", "1-2": "A value for the key. This can be an int, string, number, or array, depending on the key\nUnlike Targeting or Creative Attributes, the value is not required to be in an array.", "2-0": "custom", "2-1": "false", "2-2": "Used to indicate whether the bidding logic is on a Beeswax server or a custom algorithm. This field will generally be set automatically by the system and can be safely omitted.", "3-0": "pacing", "3-1": "lifetime", "3-2": "If a bidding strategy can be paced, the `pacing` value can be set to `daily` or `lifetime`. If it cannot be paced, then it should be set to `none`" }, "cols": 3, "rows": 4 } [/block]