Recommended
https://rebuyengine.com/api/v1/products/recommendedUse Cases
Use this endpoint to build automated AI-based product recommendation workflows. For example, if a customer is buying A, use this endpoint to automatically surface and suggest they buy complimentary product B too.
Excluding Products
Add exclude_rebuy as a Shopify Product Tag to exclude products from being recommended.
Query Parameters¶
shopify_product_ids· string- Comma separated list of Shopify Product IDs to filter from the result set. Also used if only passing up single product ID.
shopify_collection_id· string- Shopify Collection ID. If provided, products belonging to this collection will be returned. Also used if only passing up single variant ID.
shopify_variant_ids· string- Comma separated list of Shopify Variant IDs to filter from the result set.
metafields· string- Valid values: yes. Returns product objects enriched with a metafields property.
variant_metafields· string- Valid values: yes. Returns product objects enriched an enriched variant metafields property
bust_cache· string- Valid values: yes. Deletes cached response and generates a new one.
format· string- Valid values: pretty. Use pretty to make the response easy to read.
limit· string · Default:5- Used to limit the number of returned results.
any_variant_price_less_than· string- Returns products that have any variant prices less than or equal to. Example value: 14.00
any_variant_price_less_than_or_equal_to· string- Returns products that have any variant prices less than or equal to. Example value: 14.00
any_variant_price_equal_to· string- Returns products that have any variant prices equal to. Example value: 99.00
variant_price_greater_than· string- Returns products that have any variant prices greater than. Example value: 10.00
variant_price_greater_than_or_equal_to· string- Returns products that have any variant prices greater than or equal to. Example value: 14.00
unset_variants· string- Unset all product variants that don't pass variant price conditions
filter_oos· string · Default:yes- Excludes products that are out of stock (OOS) from the response. To include OOS products, set the parameter to equal no.
context· string · Default:default- Toggles the recommended products to use the similar products AI
country_code· string-
The ISO 3166-1 alpha-2 country code (e.g.,
US,CA,GB) corresponding to a Market region. Retrieves variant pricing from the Market’s catalog. The prices returned reflect the shop’s first active Market that matches the providedcountry_code. Only products included in that Market’s catalog will be returned in the response — products excluded from the catalog will not appear.Required Shopify Scope:
read_marketsReplaces the deprecated
presentment_pricesquery parameter.
Code Example¶
// GET https://rebuyengine.com/api/v1/products/recommended
const params = new URLSearchParams({
shopify_product_ids: "YOUR_VALUE",
shopify_collection_id: "YOUR_VALUE"
});
fetch(`https://rebuyengine.com/api/v1/products/recommended?${params}`)
.then(response => response.json())
.then(data => console.log(data));
Response Examples¶
200 - 200¶
{
"data": [
{
"id": 562415992868,
"title": "Performance Half Zip Pullover",
"body_html": "Performance Half Zip Pullover",
"vendor": "Example Brand",
"product_type": "",
"created_at": "2018-03-20T14:21:47-04:00",
"handle": "sport-tek-performance-half-zip-pullover",
"updated_at": "2021-12-21T19:01:23-05:00",
"published_at": "2018-03-20T14:20:53-04:00",
"template_suffix": null,
"status": "active",
"published_scope": "global",
"tags": "clothing",
"admin_graphql_api_id": "gid://shopify/Product/562415992868",
"variants": [
{
"id": 7162596589604,
"product_id": 562415992868,
"title": "Royal Blue",
"price": "50.00",
"sku": "SPHZP-1",
"position": 1,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": null,
"option1": "Royal Blue",
"option2": null,
"option3": null,
"created_at": "2018-03-20T14:21:47-04:00",
"updated_at": "2021-05-28T16:48:59-04:00",
"taxable": true,
"barcode": "",
"grams": 0,
"image_id": 2155988090916,
"weight": 0,
"weight_unit": "lb",
"inventory_item_id": 7159821402148,
"inventory_quantity": 0,
"old_inventory_quantity": 0,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/7162596589604"
},
{
"id": 7162596622372,
"product_id": 562415992868,
"title": "White",
"price": "50.00",
"sku": "SPHZP-2",
"position": 2,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": null,
"option1": "White",
"option2": null,
"option3": null,
"created_at": "2018-03-20T14:21:47-04:00",
"updated_at": "2021-05-28T16:48:59-04:00",
"taxable": true,
"barcode": "",
"grams": 0,
"image_id": 2155988615204,
"weight": 0,
"weight_unit": "lb",
"inventory_item_id": 7159821434916,
"inventory_quantity": -1,
"old_inventory_quantity": -1,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/7162596622372"
}
],
"options": [
{
"id": 833063026724,
"product_id": 562415992868,
"name": "Color",
"position": 1,
"values": [
"Royal Blue",
"White"
]
}
],
"images": [
{
"id": 2155988090916,
"product_id": 562415992868,
"position": 1,
"created_at": "2018-03-20T14:21:52-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Sport-Tek_Performance_Half_Zip_Pullover-royal-A.png?v=1573880386",
"variant_ids": [
7162596589604
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155988090916"
},
{
"id": 2155988484132,
"product_id": 562415992868,
"position": 2,
"created_at": "2018-03-20T14:21:55-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Sport-Tek_Performance_Half_Zip_Pullover-royal-B.png?v=1573880386",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155988484132"
},
{
"id": 2155988615204,
"product_id": 562415992868,
"position": 3,
"created_at": "2018-03-20T14:21:56-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Sport-Tek_Performance_Half_Zip_Pullover-white-A.png?v=1573880386",
"variant_ids": [
7162596622372
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155988615204"
},
{
"id": 2155988713508,
"product_id": 562415992868,
"position": 4,
"created_at": "2018-03-20T14:21:58-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Sport-Tek_Performance_Half_Zip_Pullover-white-B.png?v=1573880386",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155988713508"
}
],
"image": {
"id": 2155988090916,
"product_id": 562415992868,
"position": 1,
"created_at": "2018-03-20T14:21:52-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Sport-Tek_Performance_Half_Zip_Pullover-royal-A.png?v=1573880386",
"variant_ids": [
7162596589604
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155988090916"
},
"cache_info": {
"loaded_options": {
"metafields": false,
"variant_metafields": false,
"selling_plans": false,
"presentment_prices": false
},
"cached_at_time": "never",
"cache_key": "pro_c#d215c1a3068022422803eb885062a92c",
"cache_key_readable": "pro_c##shopify_product_id:\"562415992868\""
},
"owner": "45"
},
{
"id": 562405015588,
"title": "50/50 T - Maybe The Best T Shirt On The Market",
"body_html": "50/50 T + FREE SWAG AND SHIPPING!!$Yes$#<br>",
"vendor": "Example Brand",
"product_type": "shirts",
"created_at": "2018-03-20T14:16:12-04:00",
"handle": "hanes-50-50-t-shirt",
"updated_at": "2022-04-15T13:11:11-04:00",
"published_at": "2019-09-26T22:48:25-04:00",
"template_suffix": "",
"status": "active",
"published_scope": "global",
"tags": "abc, clothing, hoodies",
"admin_graphql_api_id": "gid://shopify/Product/562405015588",
"variants": [
{
"id": 7162531512356,
"product_id": 562405015588,
"title": "Lime",
"price": "10.00",
"sku": "H5050TS-1",
"position": 1,
"inventory_policy": "deny",
"compare_at_price": "12.00",
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "Lime",
"option2": null,
"option3": null,
"created_at": "2018-03-20T14:16:12-04:00",
"updated_at": "2022-02-28T19:07:25-05:00",
"taxable": true,
"barcode": "",
"grams": 0,
"image_id": 2155956699172,
"weight": 0,
"weight_unit": "lb",
"inventory_item_id": 7159756619812,
"inventory_quantity": 0,
"old_inventory_quantity": 0,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/7162531512356"
},
{
"id": 7162531545124,
"product_id": 562405015588,
"title": "Yellow",
"price": "8.00",
"sku": "H5050TS-2",
"position": 2,
"inventory_policy": "continue",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "Yellow",
"option2": null,
"option3": null,
"created_at": "2018-03-20T14:16:12-04:00",
"updated_at": "2022-04-15T13:11:11-04:00",
"taxable": true,
"barcode": "",
"grams": 0,
"image_id": 2155957387300,
"weight": 0,
"weight_unit": "lb",
"inventory_item_id": 7159756652580,
"inventory_quantity": -2,
"old_inventory_quantity": -2,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/7162531545124"
}
],
"options": [
{
"id": 833046904868,
"product_id": 562405015588,
"name": "Color",
"position": 1,
"values": [
"Lime",
"Yellow"
]
}
],
"images": [
{
"id": 2155956699172,
"product_id": 562405015588,
"position": 1,
"created_at": "2018-03-20T14:16:17-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-lime-A.png?v=1573880386",
"variant_ids": [
7162531512356
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155956699172",
"metafields": []
},
{
"id": 2155957157924,
"product_id": 562405015588,
"position": 2,
"created_at": "2018-03-20T14:16:20-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-lime-B.png?v=1573880386",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155957157924",
"metafields": []
},
{
"id": 2155957387300,
"product_id": 562405015588,
"position": 3,
"created_at": "2018-03-20T14:16:22-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-yellow-A.png?v=1573880386",
"variant_ids": [
7162531545124
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155957387300",
"metafields": []
},
{
"id": 2155957583908,
"product_id": 562405015588,
"position": 4,
"created_at": "2018-03-20T14:16:25-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-yellow-B.png?v=1573880386",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155957583908",
"metafields": []
}
],
"image": {
"id": 2155956699172,
"product_id": 562405015588,
"position": 1,
"created_at": "2018-03-20T14:16:17-04:00",
"updated_at": "2019-11-15T23:59:46-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Hanes_50_50_T-shirt-lime-A.png?v=1573880386",
"variant_ids": [
7162531512356
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155956699172",
"metafields": []
},
"cache_info": {
"loaded_options": {
"metafields": false,
"variant_metafields": false,
"selling_plans": false,
"presentment_prices": false
},
"cached_at_time": "never",
"cache_key": "pro_c#2967b023903349f20013333f65ee05dd",
"cache_key_readable": "pro_c##shopify_product_id:\"562405015588\""
},
"owner": "45"
},
{
"id": 562391777316,
"title": "USA Made Tri-Blend T",
"body_html": "USA Made Tri-Blend T .",
"vendor": "Example Brand",
"product_type": "",
"created_at": "2018-03-20T14:05:58-04:00",
"handle": "american-apparel-usa-made-tri-blend-t-shirt",
"updated_at": "2022-03-13T00:10:03-05:00",
"published_at": "2018-03-20T14:04:18-04:00",
"template_suffix": "",
"status": "active",
"published_scope": "global",
"tags": "clothing",
"admin_graphql_api_id": "gid://shopify/Product/562391777316",
"variants": [
{
"id": 7162460995620,
"product_id": 562391777316,
"title": "Blue",
"price": "13.00",
"sku": "AAUMTBTS-1",
"position": 1,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": null,
"option1": "Blue",
"option2": null,
"option3": null,
"created_at": "2018-03-20T14:05:58-04:00",
"updated_at": "2022-03-13T00:07:57-05:00",
"taxable": true,
"barcode": "",
"grams": 0,
"image_id": 2155896963108,
"weight": 0,
"weight_unit": "lb",
"inventory_item_id": 7159680663588,
"inventory_quantity": -30,
"old_inventory_quantity": -30,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/7162460995620"
},
{
"id": 7162461028388,
"product_id": 562391777316,
"title": "Green",
"price": "15.00",
"sku": "AAUMTBTS-2",
"position": 2,
"inventory_policy": "deny",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": null,
"option1": "Green",
"option2": null,
"option3": null,
"created_at": "2018-03-20T14:05:58-04:00",
"updated_at": "2021-06-24T00:16:45-04:00",
"taxable": true,
"barcode": "",
"grams": 0,
"image_id": 2155897782308,
"weight": 0,
"weight_unit": "lb",
"inventory_item_id": 7159680761892,
"inventory_quantity": -10,
"old_inventory_quantity": -10,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/7162461028388"
}
],
"options": [
{
"id": 833030619172,
"product_id": 562391777316,
"name": "Color",
"position": 1,
"values": [
"Blue",
"Green"
]
}
],
"images": [
{
"id": 2155896963108,
"product_id": 562391777316,
"position": 1,
"created_at": "2018-03-20T14:06:03-04:00",
"updated_at": "2019-11-15T23:59:45-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/American_Apparel_USA-Made_Tri-Blend_T-shirt-blue-A.png?v=1573880385",
"variant_ids": [
7162460995620
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155896963108"
},
{
"id": 2155897487396,
"product_id": 562391777316,
"position": 2,
"created_at": "2018-03-20T14:06:06-04:00",
"updated_at": "2019-11-15T23:59:45-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/American_Apparel_USA-Made_Tri-Blend_T-shirt-blue-B.png?v=1573880385",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155897487396"
},
{
"id": 2155897782308,
"product_id": 562391777316,
"position": 3,
"created_at": "2018-03-20T14:06:09-04:00",
"updated_at": "2019-11-15T23:59:45-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/American_Apparel_USA-Made_Tri-Blend_T-shirt-green-A.png?v=1573880385",
"variant_ids": [
7162461028388
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155897782308"
},
{
"id": 2155897880612,
"product_id": 562391777316,
"position": 4,
"created_at": "2018-03-20T14:06:12-04:00",
"updated_at": "2019-11-15T23:59:45-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/American_Apparel_USA-Made_Tri-Blend_T-shirt-green-B.png?v=1573880385",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155897880612"
}
],
"image": {
"id": 2155896963108,
"product_id": 562391777316,
"position": 1,
"created_at": "2018-03-20T14:06:03-04:00",
"updated_at": "2019-11-15T23:59:45-05:00",
"alt": null,
"width": 1528,
"height": 1528,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/American_Apparel_USA-Made_Tri-Blend_T-shirt-blue-A.png?v=1573880385",
"variant_ids": [
7162460995620
],
"admin_graphql_api_id": "gid://shopify/ProductImage/2155896963108"
}
},
{
"id": 1058461024292,
"title": "Classic BBQ Sauce, Organic & Unsweetened",
"body_html": "<meta charset=\"utf-8\">\n<p><span style=\"font-weight: 400;\"><span>Marinate your ribs, transform your BBQ chicken pizza, and dip your sweet potato fries with reckless abandon. <em>Meat</em> your new best friend! The</span>\u00a0ultimate cookout condiment for grill masters and sauce lovers, Primal Kitchen Classic BBQ Sauce is USDA Organic, unsweetened, and bursting with bold, smoky flavor.\u00a0</span></p>",
"vendor": "Primal Kitchen",
"product_type": "Sauce",
"created_at": "2018-12-14T15:43:38-05:00",
"handle": "classic-unsweetened-organic-bbq-sauce",
"updated_at": "2021-12-21T19:00:52-05:00",
"published_at": "2018-12-14T15:43:35-05:00",
"template_suffix": null,
"status": "active",
"published_scope": "global",
"tags": "certified-gluten-free, certified-non-gmo, Keto, keto_friendly, paleo_friendly, soy-free, sugar-free, usda_organic, Whole30, whole30-approved",
"admin_graphql_api_id": "gid://shopify/Product/1058461024292",
"variants": [
{
"id": 9896954036260,
"product_id": 1058461024292,
"title": "Default Title",
"price": "5.49",
"sku": "PKSAUCE-CBQ1",
"position": 1,
"inventory_policy": "continue",
"compare_at_price": null,
"fulfillment_service": "manual",
"inventory_management": null,
"option1": "Default Title",
"option2": null,
"option3": null,
"created_at": "2018-12-14T15:43:38-05:00",
"updated_at": "2021-05-28T16:41:34-04:00",
"taxable": false,
"barcode": "85523200735",
"grams": 241,
"image_id": null,
"weight": 8.501,
"weight_unit": "oz",
"inventory_item_id": 10737389207588,
"inventory_quantity": 0,
"old_inventory_quantity": 0,
"requires_shipping": true,
"admin_graphql_api_id": "gid://shopify/ProductVariant/9896954036260"
}
],
"options": [
{
"id": 1868258279460,
"product_id": 1058461024292,
"name": "Title",
"position": 1,
"values": [
"Default Title"
]
}
],
"images": [
{
"id": 3865665404964,
"product_id": 1058461024292,
"position": 1,
"created_at": "2018-12-14T15:43:38-05:00",
"updated_at": "2019-11-15T23:59:47-05:00",
"alt": null,
"width": 2048,
"height": 2048,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Classic_BBQ_Sauce_V1_0_Front_2048x2048_f7ea8b4b-4a5f-464a-a3b9-e9995881ae32.jpg?v=1573880387",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/3865665404964"
},
{
"id": 3865665437732,
"product_id": 1058461024292,
"position": 2,
"created_at": "2018-12-14T15:43:38-05:00",
"updated_at": "2019-11-15T23:59:47-05:00",
"alt": null,
"width": 1080,
"height": 1080,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/whole30_ig_02_1.jpg?v=1573880387",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/3865665437732"
},
{
"id": 3865665470500,
"product_id": 1058461024292,
"position": 3,
"created_at": "2018-12-14T15:43:38-05:00",
"updated_at": "2019-11-15T23:59:47-05:00",
"alt": null,
"width": 1080,
"height": 1080,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/NewSauces_IG.png?v=1573880387",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/3865665470500"
}
],
"image": {
"id": 3865665404964,
"product_id": 1058461024292,
"position": 1,
"created_at": "2018-12-14T15:43:38-05:00",
"updated_at": "2019-11-15T23:59:47-05:00",
"alt": null,
"width": 2048,
"height": 2048,
"src": "https://cdn.shopify.com/s/files/1/0011/0746/0132/products/Classic_BBQ_Sauce_V1_0_Front_2048x2048_f7ea8b4b-4a5f-464a-a3b9-e9995881ae32.jpg?v=1573880387",
"variant_ids": [],
"admin_graphql_api_id": "gid://shopify/ProductImage/3865665404964"
}
}
],
"metadata": {
"also_bot_tracking_ids": [
562415992868,
562405015588,
562415992868,
562405015588
],
"cache_info": {
"cache_key": "re_c#025410d22345210e82e2e44d8826df9e",
"cache_key_readable": "re_c#user_id:45#user_id:\"45\"#params:\"limit:4,562361892900,992809615396&format=pretty&v=1\"",
"cached_at_time": "never"
}
}
}