Base URL
eu1, us1, ap1
Authentication
hashid. A missing, invalid, or unauthorized token returns 401 Unauthorized.
How It Works
Configure URL patterns in Admin Panel
Go to Category Merchandising → Pages and create URL patterns for your category pages (e.g.
https://shop.example.com/categories/shoes*). Assign a product filter to each pattern (e.g. category = shoes).Call the API on page load
Send
GET /category_merchandising/{hashid}?url={current_page_url}. The API matches the URL against your patterns and applies the correct filter automatically.Endpoint
Required parameters
| Parameter | Description |
|---|---|
hashid | Your search engine ID (path parameter). |
url | Full URL of the current category page (query parameter). Query string and fragment are stripped before pattern matching. |
Optional parameters
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number (1-indexed). |
rpp | 50 | Results per page. |
currency | — | ISO 4217 code (e.g. EUR). Converts prices using exchange rates from your search engine config. |
sort[N][field] | category config | Sort criteria. Overrides the sort configured for the category page. |
filter[field][] | — | Additional filters on top of the URL pattern filter. Conflicting keys are silently ignored. |
exclude[field][] | — | Exclude items with specific field values. |
results_personalization_dfids[] | — | dfid values of recently-interacted items. Re-ranks results for contextual relevance. |
Example Request
Example Response
Key Concepts
URL pattern matching
The API evaluates the providedurl against all active patterns for the search engine, ordered by priority (lowest number = highest priority). The first match determines:
- The base filter applied to all results (e.g.
category = shoes) - The configured facets to return
- The default sort order
404 Not Found.
Base filter vs. client filter
base_filter | filter | |
|---|---|---|
| Source | Matched URL pattern | Caller-supplied filter[field][] params |
| Can be overridden? | No | Yes — add or remove at call time |
| Appears in facets? | No — locked dimension | Yes |
base_filter are excluded from the facets response. This prevents the UI from offering a filter that can’t be changed (e.g. showing a “category” facet on a category page).
Facet types
| Type | Description | Render as |
|---|---|---|
terms | Discrete keyword values with counts | Checkbox list |
range | Numeric min/max/avg stats | Price slider |
Banner
If a promotional banner is configured for the matched category in the Admin Panel, it appears in thebanner field. Use html_code when present (takes precedence over image); fall back to image / mobile_image otherwise.
Error Responses
| Status | Description |
|---|---|
400 | url parameter is missing |
401 | Authorization header is missing, invalid, or unauthorized |
404 | No active URL pattern matches the provided url |
502 | Upstream search engine error |