Eureka Category Merchandising API

Prev Next

Eureka’s Category Merchandising API allows you to curate and manage your product listing pages effectively. Tailored for various list pages like categories, sales, new arrivals, and brands, enables you to pin, boost, bury, or hide specific products as needed. You can set the rules using a visual merchandising editor to customize content for particular categories. Once you apply the rules, you can build the listing pages by making an API call based on the type of listing page and its filter.

The initial step involves sending your data in the correct format to Insider One, typically handled through system rules defined during the website mapping process. 

Category Merchandising API responses are in JSON format containing product matching criteria, configured merchandising content, and available facet options for further refinement.

Requirements for Category Merchandising API

  • For product details, Insider One product catalog integration methods (XML, Catalog API, and Clickstream) should be created.
  • Data collection should be activated by the Insider One team.
  • Eureka should be activated by the Insider One team.
  • If you want to use dynamic filters (facets) and sortings in the category pages, you need to set these configurations via Eureka Settings in the Insider One's InOne panel.

Endpoint

GEThttps://ineureka.api.useinsider.com/api/web/collections/{type}?cf={COLLECTION_FILTER}&p={PARTNER_ID}&l={LOCALE}&c={CURRENCY}

Visit our Postman collection to test this request.

For requests where the total URL length exceeds 2,048 characters, a POST request must be sent to the base URL, which is https://ineureka.api.useinsider.com/api/web/collections. While the HTTP protocol itself does not define an explicit maximum URL length, practical limitations exist across browsers, web servers, proxies, and load balancers.
To prevent compatibility issues and request failures, we enforce the length threshold as a precautionary measure. Although GET requests may yield faster responses in some cases, it is important to transition to POST when the payload size approaches or exceeds approximately 2,000 characters.
This ensures compliance with common platform constraints and avoids potential truncation, rejection, or undefined behavior resulting from excessively long URLs.

The only difference between GET and POST requests is that the values sent as URL parameters in GET requests must be sent as JSON body in POST requests. For example:

{
  "cf": "COLLECTION_FILTER",
  "p": "PARTNER_ID",
  "l": "LOCALE",
  "c": "CURRENCY"
}
When the request is sent, an authentication exception is thrown for security reasons. Therefore, when sending the request, you need to set the X-AUTH-TOKEN field in the header with the token shared with you and send the request.

Collection Types

When retrieving products from the product catalog, three different collection types help organize and filter results based on specific criteria. These collection types are:

Category Collection

The Category Collection type enables the retrieval of all products in the catalog that belong to a specific category, helping to narrow down results based on product type. For example, to get all shoes, you can retrieve products under the "Footwear" category.

Brand Collection

The Brand Collection type enables you to retrieve all products from a specific brand in the catalog, making it easy for users to access products from their preferred brands. For example, if you want to get all Nike products, you can use this option to retrieve only items from the "Nike" brand.

All Products Collection

The All Products Collection type allows the retrieval of all products in the catalog without any restrictions, providing access to the entire product catalog. For example, if you want to see all products, you can use this option to retrieve all products in the catalog.

Using these collection types, you can retrieve products efficiently based on your specific needs.

Common Capabilities for All Types

Sorting

The st parameter in the request can only have one value from the predefined sorting types. Using these types, the sorting algorithm for the listed products is selected. Depending on your data, the sorting types can be active or inactive. You can view these settings on the InOne panel.

ParameterSorting Type
stRelevancy
stPriceAsc
stPriceDesc
stMostPopularFirst
stBestRatedFirst
stMostRatedFirst
stNewestFirst
stMostFavoriteFirst
stMostDiscountedFirst

Filters

You can filter listed products using field names in the filter settings defined in faceting in Insider One's InOne panel.

Sample Faceting Regarding the Filter Config

Sample filter request:

&a=category~Skin~Body Lotions&a=price~5~10

In the result of this filter request, you can see the matched facets in the related property sections of items as below:

{
  "itemProperties": {
    "item_card": {
      "price": {
        "EUR": 7.75,
        ...
      },
      "category": [
        "Skin",
        "Body Lotions",
        ...
      ],
      "in_stock": 1,
      ...
    },
    ...
  },
  ...
}

The field values you can use for facet filtering are provided under data.aggregations in the result.

[
  {
    "name": "price",
    "label": "Price",
    "style": "Slider",
    "items": [
      {
        "name": "0~5",
        "min": 0.0,
        "max": 5.0
      },
      {
        "name": "5~10",
        "min": 5.0,
        "max": 10.0
      },
      ...
    ],
    "sequence": 1,
    "itemOrderType": "KeyAsc"
  },
  {
    "name": "category",
    "label": "Category",
    "style": "List",
    "items": [
      {
        "name": "Skin",
        "selected": true,
        "documentCount": 66
      },
      {
        "name": "Body Lotion",
        "selected": true,
        "documentCount": 61
      },
      ...
    ],
    "sequence": 2,
    "itemOrderType": "CountDesc"
  },
  {
    "name": "in_stock",
    "label": "In Stock",
    "style": "Checkboxes",
    "items": [
      {
        "name": "1",
        "selected": false,
        "documentCount": 12
      },
      ...
    ],
    "sequence": 3,
    "itemOrderType": "CountDesc"
  },
  ...
]

This table details the facet filter styles and their corresponding data types. Based on the specific filter style you want to implement, choose the appropriate data type.

Filter StyleData Type
PriceNumeric
RatingNumeric
RangeNumeric
SliderNumeric
CheckboxesString
ListString
ToggleBoolean

For the filters with numeric data types, such as Slider style, there should be only two values: min and max.

{field}~{minValue}~{maxValue}

Sample Filter Parameters

&a=brand~Neki
&a=category~Birds~Cats~Dogs
&a=price~50~100
&a=brand~Neki&a=price~50~100

Sample Responses

ParameterDefinition
statusIt is the field that shows the result of the search. This field can be:
- Success: Category Merchandising API response is valid.
- Error: Unexpected internal server errors.
- Invalid: Eureka Category Merchandising API returns a Validation Exception. The request is invalid.
- BusinessException: Eureka Category Merchandising API returns a Business Exception. Details are shared in Validation Exceptions section.
dataIt is the object where items, sortings, aggregations, navigations, and noResultPageText are kept as a result of a given query.
data.itemsThis field holds the list of properties for the returned items.
data.items.itemIdIt shows the item ID.
* In case there are variants of the item, the ID refers to the item to be displayed in search results. The item details are kept under data.items.itemProperties in addition to that all the variants including the item displayed are also stored in data.items.itemVariants
data.items.itemProperties.item_cardThis field holds all of the fields such as name, discount, product_attributes (which includes a list of fields such as flavor, color, etc.).
* In case there are price and original_price fields, they are the same unless there is a discount on this product. When there is a discount, price field is equal to discounted price.
* These fields may vary depending on your account.
data.items.itemVariantsThis field holds all of the variants of an item. The first element of the list is the item to be displayed in search results. The format of data.items.itemVariants items is the same as the data.items.itemProperties.item_card.
* Variants are options of the same item that have different properties. For instance, yellow and red color options of the same t-shirt might be variants of the t-shirt.
* Use of variants may be active or passive depending on your account.
data.aggregationsThis field holds a list of different aggregations.
data.aggregations.nameThis field holds the aggregation name.
data.aggregations.labelThis field holds the aggregation label (which is for showing the name of the aggregation to the end user).
data.aggregations.styleThis field holds the aggregation style. Possible values:
Price, Checkboxes, Toggle, Rating, Range, Slider, List
data.aggregations.itemsThis field holds a list of item fields for the specified aggregation.
data.aggregations.items.nameThis field holds the aggregation item name.
data.aggregations.items.labelThis field holds the aggregation item label.
data.aggregations.items.minThis field holds the minimum value of the aggregation item if the aggregation style is numeric.
data.aggregations.items.maxThis field holds the maximum value of the aggregation item if the aggregation style is numeric.
data.aggregations.items.selectedIt is a boolean field that indicates whether the aggregation item is selected if the aggregation style is not numeric.
data.aggregations.items.documentCountThis field holds the total number of documents of the aggregation item if the aggregation style is not numeric.
data.aggregations.suffixUnitThis field holds the suffix unit for the facet values as string. For instance, for perfume_size facets, ml is the suffixUnit (50ml - 100ml)
data.aggregations.prefixUnitThis field holds the prefix unit for the facet values as string.
data.aggregations.sequenceThis field holds the sequence of the aggregation for showing the aggregations to the end-user in the correct order.
data.aggregations.itemOrderTypeThis field holds the item order type of the aggregation. Possible values: KeyAsc, KeyDesc, CountDesc, CountAsc, None
data.navigationThis dictionary shows information such as pagination and total item count.
data.navigation.totalPagesThis field shows how many pages are returned for a given query.
data.navigation.currentPageThis field specifies which page the returned result is.
data.navigation.totalItemsThis field shows how many items are returned for a given query.
data.navigation.itemPerPageIt is the field that shows how many items are returned on each page.
data.noResultPageTextIf a query does not return any results, this field is used for the empty result page. E.g., No Results found
data.sortingsIt is the list where the details about sorting are kept.
data.sortings.typeIt is the field where the sorting type is located. Possible sorting types: Relevancy, PriceAsc, PriceDesc, MostPopularFirst, BestRatedFirst, MostRatedFirst,
NewestFirst, MostFavoriteFirst, MostDiscountedFirst
data.sortings.labelIt is the label of sorting that is displayed to the end user.
data.sortings.selectedIt is a boolean field that indicates whether the relevant sorting is selected.
data.defaultSortingTypeIt is the field where the sorting type of the recommended items is located. It is null when no active sorting is found.
partnerResourcesIt is the list of labels to be displayed to the end user. It provides localization flexibility based on the locale parameter sent.
*Partner resources can be set from the InOne panel.
errorWhen there is a business exception (501), this field is filled with code and message fields.
validationsWhen the request is incorrect (400 Bad Request), this field is filled with an array of type and message fields.

200 Success

{ 
  "status": "Success",
  "data": {
    "items": [...],
    "aggregations": [...],
    "navigation": {...},
    "noResultPageText": "...",
    "sortings": [...]
  },
  "redirection": null,
  "partnerResources": {...},
  "error": null,
  "validations": null
}

500 Internal Server Error

{ 
  "status": "Error",
  "data": null,
  "redirection": null,
  "partnerResources": null,
  "error": {
    "code": "500 INTERNAL_SERVER_ERROR",
    "message": "..." 
  },
  "validations": null
}

400 Business Exception

{ 
  "status": "BusinessException",
  "data": null,
  "redirection": null,
  "partnerResources": null,
  "error": {
    "code": "...",
    "message": "..." 
  },
  "validations": null
}

400 Validation Exception

{ 
  "status": "Invalid", 
  "data": null, 
  "redirection": null, 
  "partnerResources": null,
  "error": null,
  "validations": [
    {
      "type": "...",
      "message": "..."
    }
  ]
}

Fail Records Messages

  • Business Exceptions
MessageDefinitionHTTP Code
AggregationStyleNotFoundAggregation style must be provided in the partner config.400
AggregationConfigNotFoundAggregation configs must be provided in the partner config.400
SortingConfigNotFoundSorting configs must be provided in the partner config400
SortingFieldNotFoundSorting field must be provided in the partner config.400
InvalidPriceAggregationStyleIncorrect style for price aggregation is provided in the partner config.400
PartnerConfigNotFoundPartner config cannot be gathered from the cache.400
AggregationResultNotFoundUnexpected aggregation results were received according to aggregation configs.400
  • Validation Exceptions
MessageDefinitionHTTP Code
PartnerIdNotFoundp parameter is not provided in the request400
LocaleNotFoundl parameter is not provided in the request400
LocaleInvalidFormatWrong locale format is provided in the request400
CurrencyNotFoundc parameter is not provided in the request400
CurrencyInvalidFormatWrong currency format is provided in the request400
CollectionFilterNotFoundCollection filter cf is not provided400
CollectionFilterInvalidFormatCollection filter format is invalid400
InvalidCollectionFilterCollection filter must not be given with AllProducts Collection Type400
CollectionInvalidLengthCollection filter must contain number of characters between 2 and 280400
PaginationFromInvalidValueWrong pf value is provided in the request400
PaginationSizeInvalidValueWrong ps value is provided in the request400
AggregationNameNotFoundAggregation name must be provided in the request400
AggregationItemsNotFoundAggregation items must be provided in the request400
SortingTypeInvalidSorting type is not valid400