Skip to content

QuickView Search

POSThttps://rebuyengine.com/api/v1/smart-search/search/quick-view

The Quickview API provides product autocomplete suggestions based on a user query.

Headers

Rebuy-Api-Key · string · required
Your Rebuy public API key

Body Parameters

query · string · required
A string representing the user's search query
filters · object
Specifies the filtering criteria for a query or a data retrieval request
filters.collections · array of strings
A list of collection ids to filter the quickview results by (only return products that belong to the specified collections)
exclude · object
Defines the object that excludes the search results associated with the values supplied for each field
exclude.collections · array of objects
List of collections to be excluded from the search results. Each object contains collectionId (integer) and optional hideProducts (boolean, default: true)
exclude.productIds · array of strings
List of product IDs to be excluded from the search results

Code Example

fetch("https://rebuyengine.com/api/v1/smart-search/search/quick-view", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Rebuy-Api-Key": "YOUR_API_KEY"
  },
  body: JSON.stringify({
    query: "coffee",
    filters: {
      collections: []
    },
    exclude: {
      collections: [
        { collectionId: "373269922025", hideProducts: true }
      ],
      productIds: []
    }
  })
})
  .then(response => response.json())
  .then(data => console.log(data));

Response Examples

200 OK

{
  "successful": true,
  "data": {
    "productSuggestions": [
      {
        "id": "7433398157545",
        "compareAtPrice": 1000,
        "price": 500,
        "name": "Mystery Coffee Bag",
        "url": "https://rebuydemo.myshopify.com/products/mystery-coffee-bag",
        "images": [
          {
            "alt": "",
            "url": "https://cdn.shopify.com/s/files/1/0605/0555/5177/files/Mystery_1_1500x_1.png?v=1709661781"
          }
        ],
        "variants": [
          {
            "id": "42120430026985",
            "compareAtPrice": 1000,
            "price": 500,
            "name": "1 lb",
            "url": "https://rebuydemo.myshopify.com/products/mystery-coffee-bag?variant=42120430026985",
            "images": [],
            "canPurchase": true
          },
          {
            "id": "42120430059753",
            "compareAtPrice": 2000,
            "price": 1000,
            "name": "2 lb",
            "url": "https://rebuydemo.myshopify.com/products/mystery-coffee-bag?variant=42120430059753",
            "images": [],
            "canPurchase": true
          }
        ],
        "canPurchase": true,
        "ratings": {
          "average": 5,
          "count": 2
        }
      }
    ],
    "collections": [],
    "query": "coffee"
  },
  "status": 200,
  "errorMessage": null
}

400 Bad Request

{}
See something that needs updating? Suggest an edit