{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v:version/:site_id/:identifier_type/:identifier?compact=:compact&test=:test","auth":"required","settings":"56bd141fe0b1580d00b5d18f","examples":{"codes":[]},"method":"post","params":[{"name":"site_id","type":"string","default":"","desc":"Unique identifier for your Boomtrain site.","required":true,"in":"path","ref":"","_id":"56ccd19e94c8f00b00b83f42"},{"name":"identifier_type","type":"string","default":"","desc":"URL path parameter. Indicates the type of identifier used to identify the user. Currently-supported identifier types are `email`, `user_id`,  and `bsin`. A user's `bsin` can be obtained through the route documented at [Get a Boomtrain Identifier for a Person](https://boomtrain.readme.io/docs/get-a-boomtrain-identifier)","required":true,"in":"path","ref":"","_id":"56bd1626ac1c5c1900b2dbf2"},{"name":"identifier","type":"string","default":"","desc":"URL path parameter. Indicates the identifier for the user receiving recommendations.","required":true,"in":"path","ref":"","_id":"56e9a66b46bfd60e008840b1"},{"name":"medium","type":"string","default":"other","desc":"The medium making the request. Currently supported values include `android`, `display`, `email`, `ios`, `mobile`, `web`, `other`. If no value or a different value is specified, `other` will be used.","required":false,"in":"body","ref":"","_id":"56ccd19e94c8f00b00b83f3b"},{"name":"sections","type":"array_object","default":"","desc":"Added to the body of the request. Each section object corresponds to a group of recommendations with a name, a count, and a specific set of filters. See \"Section Specification\" below for details on how to specify filters.","required":true,"in":"body","ref":"","_id":"56bd1908eba850170043325f"},{"name":"compact","type":"boolean","default":"false","desc":"URL path parameter. If true, then just return resource id and resource type.  Accepts any of `t`, `true`, `y`, `yes`, or `1` as true, all other values are treated as false.","required":false,"in":"path","ref":"","_id":"56bb656168be933500aeea83"},{"name":"test","type":"boolean","default":"false","desc":"URL path parameter. If true then don't record recommendations. Accepts any of `t`, `true`, `y`, `yes`, or `1` as true, all other values are treated as false. Note that this value should NOT be set unless you are testing recommendations pre-deployment.","required":false,"in":"path","ref":"","_id":"56bb6678cec63e0d00f0d38c"},{"name":"exclude","type":"array_string","default":"","desc":"Added to the body of the request. A list of `resource_type|resource_id` strings, representing resources to exclude from recommendations.","required":false,"in":"body","ref":"","_id":"56ccd19e94c8f00b00b83f3f"},{"name":"seeds","type":"array_string","default":"","desc":"Added to the body of the request. A list of `resource_type|resource_id` strings, representing a set of resources to base the recommendations on.","required":false,"in":"body","ref":"","_id":"56ccd19e94c8f00b00b83f3e"},{"name":"caller","type":"string","default":"","desc":"Added to the body of the request. Identifies the caller for the request.","required":false,"in":"body","ref":"","_id":"56ccd19e94c8f00b00b83f3d"},{"name":"campaign","type":"string","default":"","desc":"Added to the body of the request. Identifies the campaign for which the recommendations are being requested, e.g. \"Daily Newsletter\" or \"Product Page Sidebar\"","required":false,"in":"body","ref":"","_id":"56ccd19e94c8f00b00b83f3c"},{"name":"segment","type":"string","default":"","desc":"Added to the body of the request. Allows for segmenting within campaigns. Can be used for A/B testing or grouping users.","required":false,"in":"body","ref":"","_id":"56ccd19e94c8f00b00b83f3a"},{"name":"batch","type":"string","default":"","desc":"Added to the body of the request. Identifies individual sends of one particular campaign.","required":false,"in":"body","ref":"","_id":"56cce367ca43550b002814df"}],"results":{"codes":[]}},"next":{"description":"","pages":[]},"title":"Recommendations (Advanced)","type":"endpoint","slug":"recommendations-advanced","excerpt":"The Advanced Recommendations API returns recommendation sets for a specified user. It differs from the basic GET route in that it offers support for multiple sections per call and additional filtering requirements.","body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"When you're ready to deploy this endpoint, remove 'test=true' from the URL. Otherwise, user metrics will not be recorded.\",\n  \"title\": \"Please note:\"\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"## Request\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"sections\\\": [\\n                 { \\n                    \\\"name\\\": \\\"entertainment_section\\\",\\n                   \\\"filters\\\": [ // Articles or videos with \\\"entertainment\\\" keyword\\n                        {\\n                            \\\"name\\\": \\\"resource-type\\\",\\n                            \\\"values\\\": [\\\"article\\\", \\\"video\\\"]\\n                        },\\n                        {\\n                            \\\"name\\\": \\\"keyword\\\",\\n                            \\\"values\\\": [\\\"entertainment\\\"]\\n                        }\\n                    ],\\n                    \\\"count\\\": 5\\n                  },\\n                  {\\n                    \\\"name\\\": \\\"news_articles\\\",\\n                    \\\"filters\\\": [ // Articles with either \\\"news\\\" or \\\"breaking news\\\" keyword\\n                        {\\n                            \\\"name\\\": \\\"resource-type\\\",\\n                            \\\"values\\\": [\\\"article\\\"]\\n                        },\\n                        {\\n                            \\\"name\\\": \\\"keyword\\\",\\n                            \\\"values\\\": [\\\"news\\\", \\\"breaking news\\\"]\\n                        }\\n                    ],\\n                    \\\"count\\\": 5\\n                  }\\n                 ],\\n    \\\"exclude\\\": [ \\\"article|1234\\\", \\\"video|5432\\\" ],\\n    \\\"seeds\\\": [ \\\"article|9987\\\", \\\"video|7765\\\" ],\\n    \\\"caller\\\": \\\"My Application\\\",\\n    \\\"campaign\\\": \\\"Weekly Newsletter\\\",\\n  \\t\\\"batch\\\": \\\"2016-02-29\\\",\\n    \\\"medium\\\": \\\"email\\\",\\n    \\\"segment\\\": \\\"2\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"## Results\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"name\": 200,\n      \"code\": \"{\\n\\t\\\"data\\\": {\\n    \\\"rec-set-id\\\": \\\"820875ed-66e5-4a23-a9a7-fd611e2013f0\\\",\\n\\t\\t\\\"sections\\\": {\\n\\t\\t\\t\\\"entertainment_section\\\": {\\n\\t\\t\\t\\t\\\"recs\\\": [\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\\"click-url\\\": \\\"https://redirect.api.boomtrain.com/click/application/abc?r=article:1234&c=None&b=None&rd=http://example.com\\\",\\n\\t\\t\\t\\t\\t\\t\\\"id\\\": \\\"1234\\\",\\n\\t\\t\\t\\t\\t\\t\\\"props\\\": {\\n\\t\\t\\t\\t\\t\\t\\t\\\"author\\\": \\\"Dave Williams\\\",\\n\\t\\t\\t\\t\\t\\t\\t\\\"modDate\\\": '2016-03-12T14:20:32+00:00',\\n\\t\\t\\t\\t\\t\\t\\t\\\"pubDate\\\": '2016-02-29T14:14:25+00:00',\\n\\t\\t\\t\\t\\t\\t\\t\\\"keyword\\\": \\\"entertainment\\\",\\n\\t\\t\\t\\t\\t\\t\\t\\\"title\\\": \\\"All Day Holiday Movie Marathon Slated for Feb. 29\\\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t\\\"rec-id\\\": \\\"ab539ac5-da75-11e5-ae12-0a69b99457cf\\\",\\n\\t\\t\\t\\t\\t\\t\\\"resource-type\\\": \\\"article\\\",\\n\\t\\t\\t\\t\\t\\t\\\"thumbnail\\\": \\\"http://images.boomtrain.com/nPxlsbnUidapRiOPVDYew7h3gk1qo7m95OPmYdPe67Y.png\\\"\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t// ...\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\\"type\\\": \\\"personalized\\\"\\n\\t\\t\\t},\\n\\t\\t\\t\\\"news_article\\\": {\\n\\t\\t\\t\\t\\\"recs\\\": [\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t\\\"click-url\\\": \\\"https://redirect.api.boomtrain.com/click/application/abc?r=article:0229&c=None&b=None&rd=http://example.com/2\\\",\\n\\t\\t\\t\\t\\t\\t\\\"id\\\": \\\"0229\\\",\\n\\t\\t\\t\\t\\t\\t\\\"props\\\": {\\n\\t\\t\\t\\t\\t\\t\\t\\\"author\\\": \\\"John Smith\\\",\\n\\t\\t\\t\\t\\t\\t\\t\\\"modDate\\\": '2016-03-12T14:20:32+00:00',\\n\\t\\t\\t\\t\\t\\t\\t\\\"pubDate\\\": '2016-02-29T14:14:25+00:00',\\n\\t\\t\\t\\t\\t\\t\\t\\\"keyword\\\": \\\"news\\\",\\n\\t\\t\\t\\t\\t\\t\\t\\\"title\\\": \\\"Rumblings in the Marianas Trench\\\"\\n\\t\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t\\t\\\"rec-id\\\": \\\"ab539ac5-da75-11e5-ae12-0a69b99457cf\\\",\\n\\t\\t\\t\\t\\t\\t\\\"resource-type\\\": \\\"article\\\",\\n\\t\\t\\t\\t\\t\\t\\\"thumbnail\\\": \\\"http://images.boomtrain.com/EvA0Q1EjAgyK78AwUhzNqdq0WIt0oSXx6smKGv4hgc0.gif\\\"\\n\\t\\t\\t\\t\\t},\\n\\t\\t\\t\\t\\t// ...\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\\"type\\\": \\\"personalized\\\"\\n\\t\\t\\t}\\n\\t\\t},\\n\\t\\t\\\"view-pixel\\\": \\\"https://redirect.api.boomtrain.com/vp/site/MPYIlJ5wVbiAk/WKDz+eTt7tPvJn8diIBkjyf0PO9vEUSI155pgjju+XgdHpH0S8sVcrTntNZ2A1954wgyZ80A==?c=None&b=None&p=True&rt=None&rid=None&r=None&rsid=ae3ace96-e701-11e5-9ddd-12d5480515d7\\\"\\n\\t}\\n}\",\n      \"language\": \"json\",\n      \"status\": 200\n    },\n    {\n      \"name\": 404,\n      \"code\": \"{\\n  \\\"errors\\\": [\\n    {\\n      \\\"message\\\": \\\"The requested URL was not found on the server.  If you entered the URL manually please check your spelling and try again.\\\",\\n      \\\"request_url\\\": \\\"http://recommendations.api.boomtrain.com/v1/feedbuzz/emailz/abc:::at:::b.com\\\",\\n      \\\"status\\\": 404\\n    }\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"status\": 404\n    },\n    {\n      \"status\": 500,\n      \"language\": \"text\",\n      \"code\": \"{\\n  \\\"errors\\\": [\\n    {\\n      \\\"message\\\": \\\"We had a reactor leak here now. Give us a few minutes to lock it down. Large leak, very dangerous.\\\",\\n      \\\"status\\\": 500\\n    }\\n  ]\\n}\",\n      \"name\": 500\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div><h4>Section Specification</h4>\\n  Each section in your request will contain the following fields:<br><br> <b>name</b> - The section name. (Note that both sections and filters have names).<br>\\n<b>count</b> - The number of resources to return for the section.<br><b>filters</b> - An array of zero or more filters to be applied to the section.<br>\\n<h4>Filter Specification</h4> For example, adding filters <span style='font-family:Consolas,Courier New,monospace'>{\\\"name\\\":\\\"resource-type\\\",\\\"values\\\":[\\\"articles\\\"]}</span> and <span style='font-family:Consolas,Courier New,monospace'>{\\\"name\\\":\\\"keywords\\\",\\\"values\\\":[\\\"dogs\\\"]}</span> would filter the section to articles with the \\\"dogs\\\" keyword.<br><br>\\nFilters are specified as follows:<br><br>\\n<b>name</b> - A string that indicates which field of your resource the filter will be applied to, e.g. \\\"resource-type\\\", \\\"pubDate\\\", \\\"keywords\\\".<br><b>operator</b> - The operator for the filter. Filter operators allow you to specify relations between the filter values. Supported filters include:<br><br>\\n  <table>\\n    <tbody>\\n      <tr>\\n        <th>Operator</th><th>Values Accepted</th><th>Interpretation</th><th>Example</th>\\n    </tr>\\n  <tr><td>AFTER</td><td>A single ISO-8601 Duration string.</td><td>Can only be applied to timestamp fields such as pubDate and modDate or count/score/currency fields. Returns resources with a timestamp after the end of the provided duration, or values greater than or equal to the provided integer or floating point value for non-timestamp fields.</td><td><span style='font-family:Consolas,Courier New,monospace'>{\\\"name\\\":\\\"pubDate\\\", \\\"operator\\\":\\\"AFTER\\\", \\\"values\\\":[\\\"-P7D\\\"]} // pubDate after seven days ago.<br/>{\\\"name\\\":\\\"age\\\", \\\"operator\\\":\\\"AFTER\\\", \\\"values\\\":[25]} // age greater than or equal to 25. </span></td></tr>\\n  <tr><td>BEFORE</td><td>A single ISO-8601 Duration string.</td><td>Can only be applied to timestamp fields such as pubDate and modDate or count/score/currency fields. Returns resources with a timestamp before the beginning of the provided duration, or values less than the provided integer or floating point value for non-timestamp fields.</td><td><span style='font-family:Consolas,Courier New,monospace'>{\\\"name\\\":\\\"expDate\\\", \\\"operator\\\":\\\"BEFORE\\\", \\\"values\\\":[\\\"P1D\\\"], } // expDate before 1 days from now.<br/>{\\\"name\\\":\\\"age\\\", \\\"operator\\\":\\\"BEFORE\\\", \\\"values\\\":[25], } //age less than 25. </span></td></tr>\\n  <tr><td>BETWEEN</td><td>Two ISO-8601 Duration strings.</td><td>Can only be applied to timestamp fields such as pubDate and modDate. Returns resources with a timestamp after the first provided value and before the second provided value.</td><td>{\\\"name\\\":\\\"pubDate\\\",\\\"operator\\\":\\\"BETWEEN\\\", \\\"values\\\":[\\\"-P2D\\\", \\\"-P1D\\\"]} // pubDate between 2 days ago and 1 day ago.</td></tr>\\n  <tr><td>NOT</td><td>Any number of strings.</td><td>Returns results where the field does not match any of the provided values.</td><td>{\\\"name\\\":\\\"keywords\\\", \\\"operator\\\":\\\"NOT\\\", \\\"values\\\":[\\\"dogs\\\", \\\"cats\\\"]} // keywords contains neither dogs nor cats.</td></tr>\\n  </tbody>\\n  </table>\\nIf no operator is specified, we check the fields for equality. For example: <ul><li>The filter <span style='font-family:Consolas,Courier New,monospace'>{\\\"name\\\":\\\"keywords\\\", \\\"values\\\":[\\\"dogs\\\", \\\"cats\\\"]}</span> will filter to resources that contain either \\\"dogs\\\" or \\\"cats\\\" as a keyword.</li><li>The filter <span style='font-family:Consolas,Courier New,monospace'>{\\\"name\\\":\\\"color\\\", \\\"values\\\":[\\\"red\\\"]}</span> will filter to resources with the color field set to \\\"red\\\".</li></ul><br> <b>values</b> - An array of strings, integers, or floating point numbers representing the fields of the resource to filter the recommendation to.\\n<h4>View Pixel Tracking</h4>\\nIn order to provide metrics and data to improve Boomtrain's recommendation systems, the `view-pixel` returned in the result of this call should be impressed whenever these results are viewed by a user. This can be done by adding an invisible image pixel into the HTML body where the request is being shown. For example, <span style='font-family:Consolas,Courier New,monospace'>&lt;img src=\\\"view-pixel returned by this route\\\" /&gt;</span>.\\n</div>\\n<style></style>\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Results\"\n}\n[/block]\nNote that the `view-pixel` should be rendered on each impression of a recommendation set in order to track views of recommendations.\n\nAs well, the `click-url` should be triggered upon click of any recommendation in order to track clicks for the purpose of evaluating performance.","updates":[],"order":2,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"56bb656168be933500aeea82","createdAt":"2016-02-10T16:29:21.548Z","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["56aff08d3a5b810d00745d9d","56aff24f3a5b810d00745da0","56aff25dbc304a0d00ace207","56aff287e0b1e40d00c53798","56aff2b260a37a0d00ed8883","56aff2b8e0b1e40d00c53799","56aff2bd5b1f01170014dc7b","56aff2c9d21e9c0d00b62993","56aff493aef9a21700da0e67","56aff4ce1486990d009c0f64","56aff4da5b1f01170014dc7d","56aff4dfe0b1e40d00c537a2","56aff4e59d32e30d0006d3e9","56aff4e91486990d009c0f65","56aff4f93a5b810d00745da2","56aff4fe9d32e30d0006d3ea","56b91c7ab1e03e0d001057c5","56c4f51aba4a540d0091b9a2","56cd09488c4a331d002c1e44","56d4ec4773dcd20b00fb8769","56e79bc515f96b2200878e54","56ec25c538ff1d2200d56cc2","56ec3a6f36bc8e0e00f190c8","56ec3e308ea7ce0e00a3d8b0","5724d8fe4255580e005938b2","5724dc842ad0bc1700122803","5776ef2a04f7500e0095dc37","57ab9f70b5e8742000e17eb9","57d7117646dcc30e007dd21f","58e6abd5b1eece19008b7d31","59288c65e2653627003e1221","5a8f4797a44f8600128e75ee","5bbf8833eb416300039a2c14","5ea811617bf4b5007328a0af"],"_id":"56aff08c3a5b810d00745d9c","project":"56aff08c3a5b810d00745d99","releaseDate":"2016-02-01T23:55:56.544Z","__v":34,"createdAt":"2016-02-01T23:55:56.544Z"},"__v":24,"user":"56b952ce5d75fe0d00fbcd39","parentDoc":null,"project":"56aff08c3a5b810d00745d99","editedParams":true,"editedParams2":true,"githubsync":"","category":{"sync":{"isSync":false,"url":""},"pages":["56d4ec8573dcd20b00fb876a"],"title":"Server-Side Integration REST API","slug":"authorization","order":3,"from_sync":false,"reference":true,"_id":"56d4ec4773dcd20b00fb8769","__v":1,"version":"56aff08c3a5b810d00745d9c","createdAt":"2016-03-01T01:11:35.547Z","project":"56aff08c3a5b810d00745d99"}}

postRecommendations (Advanced)

The Advanced Recommendations API returns recommendation sets for a specified user. It differs from the basic GET route in that it offers support for multiple sections per call and additional filtering requirements.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

site_id:
required
string
Unique identifier for your Boomtrain site.
identifier_type:
required
string
URL path parameter. Indicates the type of identifier used to identify the user. Currently-supported identifier types are `email`, `user_id`, and `bsin`. A user's `bsin` can be obtained through the route documented at [Get a Boomtrain Identifier for a Person](https://boomtrain.readme.io/docs/get-a-boomtrain-identifier)
identifier:
required
string
URL path parameter. Indicates the identifier for the user receiving recommendations.
compact:
booleanfalse
URL path parameter. If true, then just return resource id and resource type. Accepts any of `t`, `true`, `y`, `yes`, or `1` as true, all other values are treated as false.
test:
booleanfalse
URL path parameter. If true then don't record recommendations. Accepts any of `t`, `true`, `y`, `yes`, or `1` as true, all other values are treated as false. Note that this value should NOT be set unless you are testing recommendations pre-deployment.

Body Params

medium:
stringother
The medium making the request. Currently supported values include `android`, `display`, `email`, `ios`, `mobile`, `web`, `other`. If no value or a different value is specified, `other` will be used.
sections:
required
array of objects
Added to the body of the request. Each section object corresponds to a group of recommendations with a name, a count, and a specific set of filters. See "Section Specification" below for details on how to specify filters.
exclude:
array of strings
Added to the body of the request. A list of `resource_type|resource_id` strings, representing resources to exclude from recommendations.
seeds:
array of strings
Added to the body of the request. A list of `resource_type|resource_id` strings, representing a set of resources to base the recommendations on.
caller:
string
Added to the body of the request. Identifies the caller for the request.
campaign:
string
Added to the body of the request. Identifies the campaign for which the recommendations are being requested, e.g. "Daily Newsletter" or "Product Page Sidebar"
segment:
string
Added to the body of the request. Allows for segmenting within campaigns. Can be used for A/B testing or grouping users.
batch:
string
Added to the body of the request. Identifies individual sends of one particular campaign.

Documentation

[block:callout] { "type": "warning", "body": "When you're ready to deploy this endpoint, remove 'test=true' from the URL. Otherwise, user metrics will not be recorded.", "title": "Please note:" } [/block] [block:textarea] { "text": "## Request", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"sections\": [\n { \n \"name\": \"entertainment_section\",\n \"filters\": [ // Articles or videos with \"entertainment\" keyword\n {\n \"name\": \"resource-type\",\n \"values\": [\"article\", \"video\"]\n },\n {\n \"name\": \"keyword\",\n \"values\": [\"entertainment\"]\n }\n ],\n \"count\": 5\n },\n {\n \"name\": \"news_articles\",\n \"filters\": [ // Articles with either \"news\" or \"breaking news\" keyword\n {\n \"name\": \"resource-type\",\n \"values\": [\"article\"]\n },\n {\n \"name\": \"keyword\",\n \"values\": [\"news\", \"breaking news\"]\n }\n ],\n \"count\": 5\n }\n ],\n \"exclude\": [ \"article|1234\", \"video|5432\" ],\n \"seeds\": [ \"article|9987\", \"video|7765\" ],\n \"caller\": \"My Application\",\n \"campaign\": \"Weekly Newsletter\",\n \t\"batch\": \"2016-02-29\",\n \"medium\": \"email\",\n \"segment\": \"2\"\n}", "language": "json" } ], "sidebar": true } [/block] [block:textarea] { "text": "## Results", "sidebar": true } [/block] [block:code] { "codes": [ { "name": 200, "code": "{\n\t\"data\": {\n \"rec-set-id\": \"820875ed-66e5-4a23-a9a7-fd611e2013f0\",\n\t\t\"sections\": {\n\t\t\t\"entertainment_section\": {\n\t\t\t\t\"recs\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"click-url\": \"https://redirect.api.boomtrain.com/click/application/abc?r=article:1234&c=None&b=None&rd=http://example.com\",\n\t\t\t\t\t\t\"id\": \"1234\",\n\t\t\t\t\t\t\"props\": {\n\t\t\t\t\t\t\t\"author\": \"Dave Williams\",\n\t\t\t\t\t\t\t\"modDate\": '2016-03-12T14:20:32+00:00',\n\t\t\t\t\t\t\t\"pubDate\": '2016-02-29T14:14:25+00:00',\n\t\t\t\t\t\t\t\"keyword\": \"entertainment\",\n\t\t\t\t\t\t\t\"title\": \"All Day Holiday Movie Marathon Slated for Feb. 29\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"rec-id\": \"ab539ac5-da75-11e5-ae12-0a69b99457cf\",\n\t\t\t\t\t\t\"resource-type\": \"article\",\n\t\t\t\t\t\t\"thumbnail\": \"http://images.boomtrain.com/nPxlsbnUidapRiOPVDYew7h3gk1qo7m95OPmYdPe67Y.png\"\n\t\t\t\t\t},\n\t\t\t\t\t// ...\n\t\t\t\t],\n\t\t\t\t\"type\": \"personalized\"\n\t\t\t},\n\t\t\t\"news_article\": {\n\t\t\t\t\"recs\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"click-url\": \"https://redirect.api.boomtrain.com/click/application/abc?r=article:0229&c=None&b=None&rd=http://example.com/2\",\n\t\t\t\t\t\t\"id\": \"0229\",\n\t\t\t\t\t\t\"props\": {\n\t\t\t\t\t\t\t\"author\": \"John Smith\",\n\t\t\t\t\t\t\t\"modDate\": '2016-03-12T14:20:32+00:00',\n\t\t\t\t\t\t\t\"pubDate\": '2016-02-29T14:14:25+00:00',\n\t\t\t\t\t\t\t\"keyword\": \"news\",\n\t\t\t\t\t\t\t\"title\": \"Rumblings in the Marianas Trench\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"rec-id\": \"ab539ac5-da75-11e5-ae12-0a69b99457cf\",\n\t\t\t\t\t\t\"resource-type\": \"article\",\n\t\t\t\t\t\t\"thumbnail\": \"http://images.boomtrain.com/EvA0Q1EjAgyK78AwUhzNqdq0WIt0oSXx6smKGv4hgc0.gif\"\n\t\t\t\t\t},\n\t\t\t\t\t// ...\n\t\t\t\t],\n\t\t\t\t\"type\": \"personalized\"\n\t\t\t}\n\t\t},\n\t\t\"view-pixel\": \"https://redirect.api.boomtrain.com/vp/site/MPYIlJ5wVbiAk/WKDz+eTt7tPvJn8diIBkjyf0PO9vEUSI155pgjju+XgdHpH0S8sVcrTntNZ2A1954wgyZ80A==?c=None&b=None&p=True&rt=None&rid=None&r=None&rsid=ae3ace96-e701-11e5-9ddd-12d5480515d7\"\n\t}\n}", "language": "json", "status": 200 }, { "name": 404, "code": "{\n \"errors\": [\n {\n \"message\": \"The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.\",\n \"request_url\": \"http://recommendations.api.boomtrain.com/v1/feedbuzz/emailz/[email protected]\",\n \"status\": 404\n }\n ]\n}", "language": "json", "status": 404 }, { "status": 500, "language": "text", "code": "{\n \"errors\": [\n {\n \"message\": \"We had a reactor leak here now. Give us a few minutes to lock it down. Large leak, very dangerous.\",\n \"status\": 500\n }\n ]\n}", "name": 500 } ], "sidebar": true } [/block] [block:html] { "html": "<div><h4>Section Specification</h4>\n Each section in your request will contain the following fields:<br><br> <b>name</b> - The section name. (Note that both sections and filters have names).<br>\n<b>count</b> - The number of resources to return for the section.<br><b>filters</b> - An array of zero or more filters to be applied to the section.<br>\n<h4>Filter Specification</h4> For example, adding filters <span style='font-family:Consolas,Courier New,monospace'>{\"name\":\"resource-type\",\"values\":[\"articles\"]}</span> and <span style='font-family:Consolas,Courier New,monospace'>{\"name\":\"keywords\",\"values\":[\"dogs\"]}</span> would filter the section to articles with the \"dogs\" keyword.<br><br>\nFilters are specified as follows:<br><br>\n<b>name</b> - A string that indicates which field of your resource the filter will be applied to, e.g. \"resource-type\", \"pubDate\", \"keywords\".<br><b>operator</b> - The operator for the filter. Filter operators allow you to specify relations between the filter values. Supported filters include:<br><br>\n <table>\n <tbody>\n <tr>\n <th>Operator</th><th>Values Accepted</th><th>Interpretation</th><th>Example</th>\n </tr>\n <tr><td>AFTER</td><td>A single ISO-8601 Duration string.</td><td>Can only be applied to timestamp fields such as pubDate and modDate or count/score/currency fields. Returns resources with a timestamp after the end of the provided duration, or values greater than or equal to the provided integer or floating point value for non-timestamp fields.</td><td><span style='font-family:Consolas,Courier New,monospace'>{\"name\":\"pubDate\", \"operator\":\"AFTER\", \"values\":[\"-P7D\"]} // pubDate after seven days ago.<br/>{\"name\":\"age\", \"operator\":\"AFTER\", \"values\":[25]} // age greater than or equal to 25. </span></td></tr>\n <tr><td>BEFORE</td><td>A single ISO-8601 Duration string.</td><td>Can only be applied to timestamp fields such as pubDate and modDate or count/score/currency fields. Returns resources with a timestamp before the beginning of the provided duration, or values less than the provided integer or floating point value for non-timestamp fields.</td><td><span style='font-family:Consolas,Courier New,monospace'>{\"name\":\"expDate\", \"operator\":\"BEFORE\", \"values\":[\"P1D\"], } // expDate before 1 days from now.<br/>{\"name\":\"age\", \"operator\":\"BEFORE\", \"values\":[25], } //age less than 25. </span></td></tr>\n <tr><td>BETWEEN</td><td>Two ISO-8601 Duration strings.</td><td>Can only be applied to timestamp fields such as pubDate and modDate. Returns resources with a timestamp after the first provided value and before the second provided value.</td><td>{\"name\":\"pubDate\",\"operator\":\"BETWEEN\", \"values\":[\"-P2D\", \"-P1D\"]} // pubDate between 2 days ago and 1 day ago.</td></tr>\n <tr><td>NOT</td><td>Any number of strings.</td><td>Returns results where the field does not match any of the provided values.</td><td>{\"name\":\"keywords\", \"operator\":\"NOT\", \"values\":[\"dogs\", \"cats\"]} // keywords contains neither dogs nor cats.</td></tr>\n </tbody>\n </table>\nIf no operator is specified, we check the fields for equality. For example: <ul><li>The filter <span style='font-family:Consolas,Courier New,monospace'>{\"name\":\"keywords\", \"values\":[\"dogs\", \"cats\"]}</span> will filter to resources that contain either \"dogs\" or \"cats\" as a keyword.</li><li>The filter <span style='font-family:Consolas,Courier New,monospace'>{\"name\":\"color\", \"values\":[\"red\"]}</span> will filter to resources with the color field set to \"red\".</li></ul><br> <b>values</b> - An array of strings, integers, or floating point numbers representing the fields of the resource to filter the recommendation to.\n<h4>View Pixel Tracking</h4>\nIn order to provide metrics and data to improve Boomtrain's recommendation systems, the `view-pixel` returned in the result of this call should be impressed whenever these results are viewed by a user. This can be done by adding an invisible image pixel into the HTML body where the request is being shown. For example, <span style='font-family:Consolas,Courier New,monospace'>&lt;img src=\"view-pixel returned by this route\" /&gt;</span>.\n</div>\n<style></style>" } [/block] [block:api-header] { "type": "basic", "title": "Results" } [/block] Note that the `view-pixel` should be rendered on each impression of a recommendation set in order to track views of recommendations. As well, the `click-url` should be triggered upon click of any recommendation in order to track clicks for the purpose of evaluating performance.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}