---
title: "Resolve v2"
method: GET
path: "/v2/search/resolve"
tags: ["search-v2"]
---

# Resolve v2

`GET /v2/search/resolve`

The endpoint searches and returns a category that is matched by the name or a product that is matched by one of its ids.

The purpose of this endpoint is to redirect a user to a specific entity, either a category or a product when he inputs a full search query.

The response of the resolve endpoint can be tuned using the synonyms settings in the SCAYLE panel.

__Word Synonyms__ enable configuration of multiple words as a synonym of a particular word. For example, "babyleggings" can be set as a synonym for "baby leggings". This will ensure that a typeahead search with keyword "babyleggings" points to products that have "baby leggings" in the product specification.

__Category synonyms__ allow mapping of certain words to categories. Example the word "office" can be mapped to a category /women/clothing/blazers. Setting this configuration will ensure that a /typeahead search with the keyword "office" returns the category /women/clothing/blazers.

A detailed explanation of the functionality can be found in [SCAYLE Panel developer guide](/en/developer-guide/products/search#suggestions)

## Query parameters

- `term` string, required
- `with` string[]
- `category.depth` integer
- `category.showHidden` boolean
- `categoryId` integer

## Response `200`

successful operation

- union
  - SearchV2CategoryResponse
    - `type` string, required
    - `categorySuggestion` SearchV2CategorySuggestion, required
      - `category` Category, required
        - `id` integer, required — The unique identifier of the category.
        - `path` string, required — The slugs for all `rootlineIds` combined with `/` (e.g., `/women/fashion`).
        - `name` string, required — The name of the category
        - `slug` string, required — A short string to describe the current category (usable, for example, in URLs as).
        - `parentId` integer, required — The parent category ID (root-level categories have a parent ID of `0`)
        - `rootlineIds` integer[], required — The IDs for the path from the topmost root category to the current category, which is included as the last item.
        - `childrenIds` integer[], required — The child category IDs attached to the current category
        - `properties` CategoryProperty[], required — Properties attached to this category.
          - `name` string, required
          - `value` union, required
            - string
            - number
        - `isHidden` boolean, required — A flag that defines if a category should be displayed by the frontend
        - `depth` integer, required — The nesting level of the category (root-level depth = 1, child nodes = 2, child nodes' children = 3, etc.)
        - `supportedFilter` string[], required — A list of filters that can be used for filtering products in the category
        - `parent` Category — recursive
        - `shopLevelCustomData` object, required — Additional category data defined on the shop level
        - `countryLevelCustomData` object — Additional category data defined on the country level
        - `children` Category[] — An array of child category objects. Returned if requested as `tree format` or using `with`.
      - `filters` SearchV2AttributeFilter[], required
        - `type` string, required
        - `attributeFilter` object, required
          - `group` object
            - `id` number — The ID of the attribute group
            - `key` string — Also known as slug
            - `label` string — The label which can be shown in the FE
            - `type` string — The type of the attribute group
            - `multiSelect` boolean
          - `values` object[]
            - `id` number — The unique ID for the attribute
            - `value` string
            - `label` string — The label which can be shown in the FE
  - SearchV2ProductResponse
    - `type` string, required
    - `productSuggestion` SearchV2ProductSuggestion, required
      - `product` Product, required
        - `id` integer, required
        - `advancedAttributes` object
        - `attributes` object
        - `baseCategories` BaseCategory[]
          - `categoryId` integer, required — Unique identifier of the category
          - `categoryName` string, required — Name of the category
          - `categoryParentId` integer, required — Parent ID of the category
          - `categoryPath` string, required — Category path as text
        - `categories` array[]
          - ProductCategory[]
            - `categoryId` integer
            - `categoryHidden` boolean
            - `categoryName` string
            - `categoryProperties` object
              - …
            - `shopLevelCustomData` object
              - …
            - `countryLevelCustomData` object
              - …
            - `categoryUrl` string
            - `categorySlug` string
        - `definingAttributes` DefiningAttribute
          - `id` integer, required
          - `label` string, required
        - `images` Image[], required
          - `attributes` object
          - `hash` string
        - `customData` ResponseCustomData, required
        - `isActive` boolean, required — Identifies whether a product is active or not
        - `isNew` boolean, required — Identifies whether a product is new or not
        - `isSoldOut` boolean, required — Identifies if a product is still available to sell
        - `masterKey` string, required — Identifies the master product which this product belongs
        - `firstLiveAt` string, required — Date string, formatted according to RFC 3339, e.g. 2018-06-01T14:56:08+02:00
        - `priceRange` PriceRange
          - `max` Price, required
            - `appliedReductions` AppliedReduction[], required
              - …
            - `currencyCode` string, required — The currency of the price.
            - `reference` object
              - …
            - `tax` Tax, required
              - …
            - `withoutTax` integer, required
            - `withTax` integer, required
            - `recommendedRetailPrice` integer, required
          - `min` Price, required
            - `appliedReductions` AppliedReduction[], required
              - …
            - `currencyCode` string, required — The currency of the price.
            - `reference` object
              - …
            - `tax` Tax, required
              - …
            - `withoutTax` integer, required
            - `withTax` integer, required
            - `recommendedRetailPrice` integer, required
        - `reductionRange` ReductionRange
          - `max` Price
            - `appliedReductions` AppliedReduction[], required
              - …
            - `currencyCode` string, required — The currency of the price.
            - `reference` object
              - …
            - `tax` Tax, required
              - …
            - `withoutTax` integer, required
            - `withTax` integer, required
            - `recommendedRetailPrice` integer, required
          - `min` Price
            - `appliedReductions` AppliedReduction[], required
              - …
            - `currencyCode` string, required — The currency of the price.
            - `reference` object
              - …
            - `tax` Tax, required
              - …
            - `withoutTax` integer, required
            - `withTax` integer, required
            - `recommendedRetailPrice` integer, required
        - `lowestPriorPrice` LowestPriorPrice — Information about the lowest price in the past 30 days.
          - `withTax` integer, nullable, required — The lowest price including tax.
          - `relativeDifferenceToPrice` number, float, nullable, required — The relative difference from the lowest prior price to the current price. If the value is positive, it means that the current price is higher than the lowest prior price. If the value is negative, it means that the current price is lower than the lowest prior price.
        - `referenceKey` string, required
        - `searchCategoryIds` integer[]
        - `siblings` Product[] — list of Products
        - `variants` Variant[]
          - `id` integer, required
          - `advancedAttributes` object
          - `appliedPricePromotionKey` string
          - `attributes` object
          - `lowestPriorPrice` LowestPriorPrice — Information about the lowest price in the past 30 days.
            - `withTax` integer, nullable, required — The lowest price including tax.
            - `relativeDifferenceToPrice` number, float, nullable, required — The relative difference from the lowest prior price to the current price. If the value is positive, it means that the current price is higher than the lowest prior price. If the value is negative, it means that the current price is lower than the lowest prior price.
          - `price` Price, required
            - `appliedReductions` AppliedReduction[], required
              - …
            - `currencyCode` string, required — The currency of the price.
            - `reference` object
              - …
            - `tax` Tax, required
              - …
            - `withoutTax` integer, required
            - `withTax` integer, required
            - `recommendedRetailPrice` integer, required
          - `productId` integer, required
          - `referenceKey` string, required
          - `firstLiveAt` string, required — Date string, formatted according to RFC 3339, e.g. 2018-06-01T14:56:08+02:00
          - `stock` Stock, required
            - `supplierId` integer, required
            - `warehouseId` integer, nullable, required
            - `quantity` integer, required
            - `isSellableWithoutStock` boolean, required
            - `expectedAvailabilityAt` string, nullable, required
          - `customData` object, required
          - `merchant` Merchant
            - `id` integer, required
            - `key` string, required
            - `name` string, required
            - `legal` object
              - …
          - `createdAt` string, required — Date string, formatted according to RFC 3339, e.g. 2018-06-01T14:56:08+02:00
          - `updatedAt` string, required — Date string, formatted according to RFC 3339, e.g. 2018-06-01T14:56:08+02:00
        - `createdAt` string, required — Date string, formatted according to RFC 3339, e.g. 2018-06-01T14:56:08+02:00
        - `updatedAt` string, required — Date string, formatted according to RFC 3339, e.g. 2018-06-01T14:56:08+02:00
        - `indexedAt` string, required — Date string, formatted according to RFC 3339, e.g. 2018-06-01T14:56:08+02:00

## Other responses

- `400` — required query parameter missing / query parameter invalid
- `401` — authentication failed

## Changes

> 3 revisions in range; 1 could not be searched.

- **2023-08-06** `302b7c443b51` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/scayle/apis/storefront-api-documentation/changes/v2/search/resolve/get.md)

---

[API](https://skmtc.dev/scayle/apis/storefront-api-documentation.md) · [All operations](https://skmtc.dev/scayle/apis/storefront-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/scayle/storefront-api-documentation/revisions/8cfa924ae703/schema)
