Results Structure

{
"request": {
...
},
"response": {
"facets": [
...
],
"groups": [
...
],
"sort_options": [
...
],
"collection": {
...
},
"results": [
{
"data": {
"groups": [
{
"display_name": "dry food",
"group_id": "dry-food",
"path": "/pet-food/dog-food/"
}
],
"facets": {
"Brand": "Natural Balance",
"Price": 17.90,
"Type": ["Dry Food", "Dog Food"]
},
"id": "123",
"image_url": "https://www.constructor.io/images/doge.jpg",
"url": "https://www.constructor.io/pages/dog",
"variation_id": "4321",
"variations": [
{
"data": {
"facets": {
"Color": "Black",
},
"id": "4321",
"image_url": "https://www.constructor.io/images/black_doge.jpg",
"url": "https://www.constructor.io/pages/dog_black",
}
},
{
"data": {
"facets": {
"Color": "Brown",
},
"id": "1234",
"image_url": "https://www.constructor.io/images/brown_doge.jpg",
"url": "https://www.constructor.io/pages/dog_brown",
}
}
]
},
"is_slotted": false,
"matched_terms": [],
"value": "Natural Balance Small Bites Potato & Duck Formula Dog Food"
}
],
"total_num_results": 1
}
}

Data field#

Structure in data is loosely defined, allowing additional fields for each items depending on your needs.

Groups info in results response

The Browse API will return information on the group(s) the item belongs to. Three pieces of information will always be returned:

  • display_name The name of the group as you'd present it to users.
  • group_id The id of the group. Any ASCII characters can be used.
  • path The path of group_IDs above this group. /great-grandparent/grandparent/parent/

This example captures common use-cases; please reach out to Constructor.io support if you'd like assistance in designing your browse experience.

Facets info in results response

The Browse API will return information on the facet(s) this item possesses. Facets are usually displayed as key-value pairs. "Brand": "Natural Balance" for example, represents the facet of "Brand" type with "Natural Balance" as the key.

Collection in results response

The Browse API will return information on the collection only for browse collection requests browse/collection_id/<collection_id>, otherwise it will be not present in results response. Collection is an object containing display_name and data fields of browsed collection.

Variations info in results response

A list of variations for the parent product will be returned. Variations data can also be configured to fit your needs accordingly.

Other useful info in results response

  • id The customer_id of the product obtained from the product catalog.
  • image_url URL of the product image.
  • url URL pf the product page.

Miscellaneous fields#

  • is_slotted will be set to true if the current product is slotted as a result of searchandizing.
  • matched_terms is a list of all terms in the query which has a match on terms within this product's data.
  • value represents the name of the product.