{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/alternative/:site_id/:identifier_type/:identifier","auth":"required","results":{"codes":[]},"settings":"56bd141fe0b1580d00b5d18f","examples":{"codes":[]},"method":"get","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-for-a-person)","required":true,"in":"path","ref":"","_id":"56e99cf0cbeede0e0006e5c6"},{"name":"identifier","type":"string","default":"","desc":"URL path parameter. Indicates the identifier for the user receiving recommendations.","required":true,"in":"path","ref":"","_id":"56bd1626ac1c5c1900b2dbf2"},{"name":"count","type":"int","default":"","desc":"Number of recommendations to return.","required":false,"in":"query","ref":"","_id":"577d43d02bcb6b0e00e9f573"},{"name":"test","type":"string","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.","required":false,"in":"query","ref":"","_id":"57520367bb25bb1900a9683c"},{"name":"exclude","type":"array_string","default":"","desc":"A list of `resource_type|resource_id` strings, representing resources to exclude from recommendations.","required":false,"in":"query","ref":"","_id":"57520367bb25bb1900a9683b"},{"name":"seeds","type":"string","default":"","desc":"A list of `resource_type|resource_id` strings, representing a set of resources to base the recommendations on.","required":false,"in":"query","ref":"","_id":"57520367bb25bb1900a9683a"},{"name":"caller","type":"string","default":"","desc":"Identifies the caller for the request. For general API usage, use the string `api`.","required":false,"in":"query","ref":"","_id":"57520367bb25bb1900a96839"},{"name":"campaign","type":"string","default":"","desc":"Identifies the campaign for which the recommendations are being requested, e.g. \"Daily Newsletter\" or \"Product Page Sidebar\"","required":false,"in":"query","ref":"","_id":"57520367bb25bb1900a96838"},{"name":"segment","type":"string","default":"","desc":"Allows for segmenting within campaigns. Can be used for A/B testing or grouping users.","required":false,"in":"query","ref":"","_id":"57520367bb25bb1900a96837"},{"name":"batch","type":"string","default":"","desc":"Identifies individual sends of one particular campaign in contexts where recommendations are sent in timed batches.","required":false,"in":"query","ref":"","_id":"57520367bb25bb1900a96836"},{"name":"filter","type":"string","default":"","desc":"URL path parameter, filters the recommendations to a specified set. See *Filter Specification* below for details.","required":false,"in":"query","ref":"","_id":"577d43d02bcb6b0e00e9f572"},{"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":"query","ref":"","_id":"59cd25cb899eb00010ef29a8"}]},"next":{"description":"","pages":[]},"title":"Alternative Item Recommendations (Basic)","type":"endpoint","slug":"alternative-item-recommendations-basic","excerpt":"The Alternative Items Recommendations API returns recommendations for a specified user that are potential alternatives to a given seed, offering a product comparison or pivot experience that revolves around a product they've shown interest in.","body":"[block:textarea]\n{\n  \"text\": \"## Request\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl 'https://recommendations.api.boomtrain.com/v2/alternative/your-site/email/user:::at:::example.com?test=true&seeds=product|331839917&fields=brand&count=3'\",\n      \"language\": \"curl\",\n      \"name\": \"Using Email Address\"\n    },\n    {\n      \"code\": \"curl 'https://recommendations.api.boomtrain.com/v2/alternative/your-site/bsin/3f10933f48fde901e90d10909a0901bsb1c01eb01ftest=true&seeds=product|331839917&fields=brand&count=3'\",\n      \"language\": \"text\",\n      \"name\": \"Using BSIN\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[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## Results\n[block:code]\n{\n  \"codes\": [\n    {\n      \"name\": 200,\n      \"code\": \"{\\n    \\\"data\\\": {\\n        \\\"recs\\\": [\\n            {\\n                \\\"click-url\\\": \\\"https://redirect.api.boomtrain.com/click/your-site/jP/fJfdB64HBMFTUc40xBjTocxaojSuy4V1y31Ld3jvTWltQ30gcHIrOLhFwRN4DKnxNt4Xqla1Ro8i3KjG47A==?g=default&rt=product&t=420982&rc=Popular&rsid=287ed22e-f58d-11e7-832f-0ad79fd724e2&rd=https%3A%2F%2Fwww.example.com%2Fproduct%2F331382207.html%23331382207%3D331382216&m=other&rid=287ed22e-f58d-11e7-832f-0ad79fd724e2:default:0&r=331382216&x=&p=False&n=0\\\",\\n                \\\"id\\\": \\\"331382216\\\",\\n                \\\"is_personalized\\\": false,\\n                \\\"props\\\": {\\n                    \\\"age_group\\\": \\\"adult\\\",\\n                    \\\"brand\\\": \\\"HELLY HANSEN\\\",\\n                    \\\"color\\\": \\\"536 RACER BLUE\\\",\\n                    \\\"condition\\\": \\\"new\\\",\\n                    \\\"custom_label_0\\\": \\\" \\\",\\n                    \\\"custom_label_1\\\": \\\" \\\",\\n                    \\\"custom_label_2\\\": \\\"Clearance\\\",\\n                    \\\"custom_label_3\\\": \\\" \\\",\\n                    \\\"description\\\": \\\"Combining the unique LIFA fiber technology next to your skin to keep you dry, with a premium merino wool exterior offers superior insulating and wicking properties.\\\",\\n                    \\\"gender\\\": \\\"male\\\",\\n                    \\\"is_bundle\\\": \\\"FALSE\\\",\\n                    \\\"item_group_id\\\": \\\"331382207\\\",\\n                    \\\"modDate\\\": \\\"2017-12-16T02:09:07+00:00\\\",\\n                    \\\"price\\\": \\\"39.88 CAD\\\",\\n                    \\\"product_type_1\\\": \\\"SOFTGOODS\\\",\\n                    \\\"product_type_2\\\": \\\"WINTER-CLOTHING-ACCESSORIES\\\",\\n                    \\\"product_type_3\\\": \\\"MENS\\\",\\n                    \\\"product_type_4\\\": \\\"UNDERWEAR\\\",\\n                    \\\"product_type_5\\\": \\\"UNDERWEAR-TOPS\\\",\\n                    \\\"pubDate\\\": \\\"2017-12-16T02:09:07+00:00\\\",\\n                    \\\"sale_price\\\": \\\"na\\\",\\n                    \\\"sale_price_effective_date-END\\\": \\\"1970-01-01T00:00:00+00:00\\\",\\n                    \\\"sale_price_effective_date-START\\\": \\\"1970-01-01T00:00:00+00:00\\\",\\n                    \\\"size\\\": \\\"s\\\",\\n                    \\\"size_system\\\": \\\"US\\\",\\n                    \\\"thumbnail\\\": \\\"https://fgl.scene7.com/is/image/FGLSportsLtd/331382207_44_a?resMode=sharp2&op_sharpen=1&hei=800&wid=800\\\",\\n                    \\\"title\\\": \\\"Helly Hansen LIFA Warm Ice Crew Underwear Top Mens\\\",\\n                    \\\"url\\\": \\\"https://www.example.com/product/331382207.html#331382207=331382216\\\"\\n                },\\n                \\\"rec-id\\\": \\\"287ed22e-f58d-11e7-832f-0ad79fd724e2:default:0\\\",\\n                \\\"recset-id\\\": \\\"287ed22e-f58d-11e7-832f-0ad79fd724e2\\\",\\n                \\\"resource-type\\\": \\\"product\\\",\\n                \\\"thumbnail\\\": \\\"https://fgl.scene7.com/is/image/FGLSportsLtd/331382207_44_a?resMode=sharp2&op_sharpen=1&hei=800&wid=800\\\"\\n            },\\n            ...\\n        ],\\n        \\\"type\\\": \\\"popular\\\",\\n        \\\"view-pixel\\\": \\\"https://redirect.api.boomtrain.com/vp/your-site/jP/fJfdB64HBMFTUc40xBjTocxaojSuy4V1y31Ld3jvTWltQ30gcHIrOLhFwRN4DKnxNt4Xqla1Ro8i3KjG47A==?rsid=287ed22e-f58d-11e7-832f-0ad79fd724e2&gn=default:3&t=420982&x=&rc=Popular&p=False\\\"\\n    }\\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/[email protected]\\\",\\n      \\\"status\\\": 404\\n    }\\n  ]\\n}\",\n      \"language\": \"json\",\n      \"status\": 404\n    },\n    {\n      \"status\": 500,\n      \"language\": \"json\",\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>  \\nIf insufficient recommendable resources can be returned that match all of the fields specified, the request will fail with a 400 response. \\n<h4>Filter Specification</h4>Each filter parameter corresponds to a constraint for the recommendations to be returned in a section. If more than one filter parameter is used, the result will be interpreted as the intersection of the filters, i.e. <i>filter1 ∩ filter2 ∩...</i> For example, adding filters <span style='font-family:Consolas,Courier New,monospace'>?filter=resource-type::article&filter=keywords::dogs</span> would filter the section to articles with the \\\"dogs\\\" keyword.<br><br>\\nFilters are specified in the format <span style='font-family:Consolas,Courier New,monospace'>name:operator:value</span> 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. Returns resources with a timestamp after the end of the provided duration.</td><td><span style='font-family:Consolas,Courier New,monospace'>?filter=pubdate:AFTER:-P7D // pubDate after seven days ago. </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. Returns resources with a timestamp before the beginning of the provided duration.</td><td><span style='font-family:Consolas,Courier New,monospace'>?filter=expDate:BEFORE:P1D // expDate before 1 day from now. </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>\\n    <span style='font-family:Consolas,Courier New,monospace'>?filter=pubDate:BETWEEN:-P2D|-P1D // pubDate between 2 days ago and 1 day ago.</span></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><span style='font-family:Consolas,Courier New,monospace'>?filter=keyword:NOT:dogs|cats // keywords contains neither dogs nor cats.</span> </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'>?filter=keywords::dogs|cats</span> will filter to resources that contain either \\\"dogs\\\" or \\\"cats\\\" as a keyword. Note that resource fields with an array type will consider an equality operation to be \\\"true\\\" if _any_ of the values in the array matches the specified value.</li><li>The filter <span style='font-family:Consolas,Courier New,monospace'>?filter=colors::red</span> will filter to resources with the \\\"red\\\" value in the \\\"colors\\\" field.</li></ul><br> <b>values</b> - Strings representing the fields of the resource to filter the recommendation to, separated by '|' characters.\\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":17,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5af9b8e7dfafb70003982eda","project":"56aff08c3a5b810d00745d99","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"},"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"},"user":"566887ff8639090d00759415","createdAt":"2018-05-14T16:27:19.904Z","githubsync":"","__v":1,"parentDoc":null}

getAlternative Item Recommendations (Basic)

The Alternative Items Recommendations API returns recommendations for a specified user that are potential alternatives to a given seed, offering a product comparison or pivot experience that revolves around a product they've shown interest in.

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-for-a-person)
identifier:
required
string
URL path parameter. Indicates the identifier for the user receiving recommendations.

Query Params

count:
integer
Number of recommendations to return.
test:
stringfalse
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.
exclude:
array of strings
A list of `resource_type|resource_id` strings, representing resources to exclude from recommendations.
seeds:
string
A list of `resource_type|resource_id` strings, representing a set of resources to base the recommendations on.
caller:
string
Identifies the caller for the request. For general API usage, use the string `api`.
campaign:
string
Identifies the campaign for which the recommendations are being requested, e.g. "Daily Newsletter" or "Product Page Sidebar"
segment:
string
Allows for segmenting within campaigns. Can be used for A/B testing or grouping users.
batch:
string
Identifies individual sends of one particular campaign in contexts where recommendations are sent in timed batches.
filter:
string
URL path parameter, filters the recommendations to a specified set. See *Filter Specification* below for details.
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.

Documentation

[block:textarea] { "text": "## Request", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "curl 'https://recommendations.api.boomtrain.com/v2/alternative/your-site/email/[email protected]?test=true&seeds=product|331839917&fields=brand&count=3'", "language": "curl", "name": "Using Email Address" }, { "code": "curl 'https://recommendations.api.boomtrain.com/v2/alternative/your-site/bsin/3f10933f48fde901e90d10909a0901bsb1c01eb01ftest=true&seeds=product|331839917&fields=brand&count=3'", "language": "text", "name": "Using BSIN" } ], "sidebar": true } [/block] [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] ## Results [block:code] { "codes": [ { "name": 200, "code": "{\n \"data\": {\n \"recs\": [\n {\n \"click-url\": \"https://redirect.api.boomtrain.com/click/your-site/jP/fJfdB64HBMFTUc40xBjTocxaojSuy4V1y31Ld3jvTWltQ30gcHIrOLhFwRN4DKnxNt4Xqla1Ro8i3KjG47A==?g=default&rt=product&t=420982&rc=Popular&rsid=287ed22e-f58d-11e7-832f-0ad79fd724e2&rd=https%3A%2F%2Fwww.example.com%2Fproduct%2F331382207.html%23331382207%3D331382216&m=other&rid=287ed22e-f58d-11e7-832f-0ad79fd724e2:default:0&r=331382216&x=&p=False&n=0\",\n \"id\": \"331382216\",\n \"is_personalized\": false,\n \"props\": {\n \"age_group\": \"adult\",\n \"brand\": \"HELLY HANSEN\",\n \"color\": \"536 RACER BLUE\",\n \"condition\": \"new\",\n \"custom_label_0\": \" \",\n \"custom_label_1\": \" \",\n \"custom_label_2\": \"Clearance\",\n \"custom_label_3\": \" \",\n \"description\": \"Combining the unique LIFA fiber technology next to your skin to keep you dry, with a premium merino wool exterior offers superior insulating and wicking properties.\",\n \"gender\": \"male\",\n \"is_bundle\": \"FALSE\",\n \"item_group_id\": \"331382207\",\n \"modDate\": \"2017-12-16T02:09:07+00:00\",\n \"price\": \"39.88 CAD\",\n \"product_type_1\": \"SOFTGOODS\",\n \"product_type_2\": \"WINTER-CLOTHING-ACCESSORIES\",\n \"product_type_3\": \"MENS\",\n \"product_type_4\": \"UNDERWEAR\",\n \"product_type_5\": \"UNDERWEAR-TOPS\",\n \"pubDate\": \"2017-12-16T02:09:07+00:00\",\n \"sale_price\": \"na\",\n \"sale_price_effective_date-END\": \"1970-01-01T00:00:00+00:00\",\n \"sale_price_effective_date-START\": \"1970-01-01T00:00:00+00:00\",\n \"size\": \"s\",\n \"size_system\": \"US\",\n \"thumbnail\": \"https://fgl.scene7.com/is/image/FGLSportsLtd/331382207_44_a?resMode=sharp2&op_sharpen=1&hei=800&wid=800\",\n \"title\": \"Helly Hansen LIFA Warm Ice Crew Underwear Top Mens\",\n \"url\": \"https://www.example.com/product/331382207.html#331382207=331382216\"\n },\n \"rec-id\": \"287ed22e-f58d-11e7-832f-0ad79fd724e2:default:0\",\n \"recset-id\": \"287ed22e-f58d-11e7-832f-0ad79fd724e2\",\n \"resource-type\": \"product\",\n \"thumbnail\": \"https://fgl.scene7.com/is/image/FGLSportsLtd/331382207_44_a?resMode=sharp2&op_sharpen=1&hei=800&wid=800\"\n },\n ...\n ],\n \"type\": \"popular\",\n \"view-pixel\": \"https://redirect.api.boomtrain.com/vp/your-site/jP/fJfdB64HBMFTUc40xBjTocxaojSuy4V1y31Ld3jvTWltQ30gcHIrOLhFwRN4DKnxNt4Xqla1Ro8i3KjG47A==?rsid=287ed22e-f58d-11e7-832f-0ad79fd724e2&gn=default:3&t=420982&x=&rc=Popular&p=False\"\n }\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": "json", "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> \nIf insufficient recommendable resources can be returned that match all of the fields specified, the request will fail with a 400 response. \n<h4>Filter Specification</h4>Each filter parameter corresponds to a constraint for the recommendations to be returned in a section. If more than one filter parameter is used, the result will be interpreted as the intersection of the filters, i.e. <i>filter1 ∩ filter2 ∩...</i> For example, adding filters <span style='font-family:Consolas,Courier New,monospace'>?filter=resource-type::article&filter=keywords::dogs</span> would filter the section to articles with the \"dogs\" keyword.<br><br>\nFilters are specified in the format <span style='font-family:Consolas,Courier New,monospace'>name:operator:value</span> 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. Returns resources with a timestamp after the end of the provided duration.</td><td><span style='font-family:Consolas,Courier New,monospace'>?filter=pubdate:AFTER:-P7D // pubDate after seven days ago. </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. Returns resources with a timestamp before the beginning of the provided duration.</td><td><span style='font-family:Consolas,Courier New,monospace'>?filter=expDate:BEFORE:P1D // expDate before 1 day from now. </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>\n <span style='font-family:Consolas,Courier New,monospace'>?filter=pubDate:BETWEEN:-P2D|-P1D // pubDate between 2 days ago and 1 day ago.</span></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><span style='font-family:Consolas,Courier New,monospace'>?filter=keyword:NOT:dogs|cats // keywords contains neither dogs nor cats.</span> </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'>?filter=keywords::dogs|cats</span> will filter to resources that contain either \"dogs\" or \"cats\" as a keyword. Note that resource fields with an array type will consider an equality operation to be \"true\" if _any_ of the values in the array matches the specified value.</li><li>The filter <span style='font-family:Consolas,Courier New,monospace'>?filter=colors::red</span> will filter to resources with the \"red\" value in the \"colors\" field.</li></ul><br> <b>values</b> - Strings representing the fields of the resource to filter the recommendation to, separated by '|' characters.\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

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