younifyd
Menu

Get products/categories

Get products/categories

GET/

Use it in a workflow

  1. Add a step and choose the Bloomreach Discovery connector.
  2. Pick the Get products/categories action (under Product & Category Search).
  3. Fill in the fields below, then reference the result from later steps as {{getProductsCategories.response.data}}.

Request

Query parameters

_br_uid_2stringrequired

A first-party cookie created by the {user.br} tracking pixel library (BrTrk). This cookie creates a unique, anonymous identifier for every browser or device. <br><br> Use the default value provided, which is already encoded.

Default "uid%3D7797686432023%3Av%3D11.5%3Ats%3D1428617911187%3Ahc%3D55"

ref_urlstringrequired

The URL of the page or HTTP referrer where the request is started.

request_typestringrequired

The type of API request. Value should be **search** for Product Search or Category requests.

One ofsearchDefault "search"

search_typestringrequired

The type of search. Value should be **keyword** for Product Search requests, **category** for Category requests.

One ofkeywordcategoryDefault "keyword"

callbackstring

Indicates whether to return data wrapped in the function for cross-origin requests. <br><br> For server-side requests, use the value **br_server**. For native-app requests, use the value **br_app**.

One ofbr_serverbr_app

efqstring

Applies a complex boolean filter to search results to include or exclude items that fit your parameter values. Any product attribute in your product feed is valid, such as brand names and sizes. <br><br> Typically, the efq parameter is used for custom attributes that you include in your product feed to support additional business logic that you might need to filter. Read more about using the efq parameter in the "Complex boolean filtering" section in the [Faceting and filtering page](ref:faceting-and-filtering).

br_diagnosticsstring

This parameter sends Product grid insights data in the API response to help debug your search results.<br>Allowed values are: `all`/`recall`/`ranking`/`merchandising`.<br><br>Refer to the guide [Product grid insights on the API](https://documentation.bloomreach.com/discovery/reference/ranking-diagnostics-on-the-api) for more details, like the response format.

One ofallrecallrankingmerchandising

facet.rangestring

Return a count of ranged facets, such as price and sale price. Use numeric attributes only. <br><br> You need to parse the values that are in the facets_counts section of the response. The facet_queries section has custom range facets for numeric fields that you define in your request. The facet_fields section gives you facets that you can display to your site's users, such as brands and colors.

facet.versionnumber (float)

Set the value of this parameter to "3.0" to use the new [Facet Response v3](https://documentation.bloomreach.com/discovery/reference/facet-response-v3-unified-ranking). This will return the facet information in the new unified format.

flstringrequired

The attributes that you want returned in your API response, such as product IDs and prices. <br><br> All fl parameters for Product Search or Category requests must include **pid** as one of their values. Any attribute from your product feed may be used as a value for fl. <br><br> Multiple values should be comma separated, such as **fl=pid,price**.

Default "pid,url,description"

fqstring

The fq parameter applies a faceted filter to the returned products, searching for products that fit your parameter values. <br><br> Any facet that you want to filter must be in your feed. Read more about using the fq parameter in the "Simple Filtering" section in the [Faceting and filtering page](ref:faceting-and-filtering). <br><br> You can [configure Attributes](doc:understanding-feed-configuring-attributes) from the Catalog Management Tab. Configure which attributes in your content feed you want to apply as filters to search results.

llstring

The latitude-longitude of the end-customer used for the [Buy Online Pick-up In Store (BOPIS) feature](doc:buy-online-pick-up-in-store-bopis). <br><br> Value should be provided as latitude,longitude. For example, **ll=11.09,10.018**. <br><br> Use **fl=store_lat_lon** to return the distance from ll. In the response body, this value is returned as an additional field with the suffix ‘.distance’. <br><br> Use **fq=store_lat_lon** to enable filtering by distance.

merchandising.tsstring (date-time)

This parameter allows you to preview the search results that would be produced at a future date.<br>It takes all the merchandising rules that will be active at the entered timestamp into account.<br>Example (Unix Epoch timestamp): 1703497216<br><br>If you have scheduled rules through the [duration selector in the dashboard](https://documentation.bloomreach.com/discovery/docs/product-grid-editor#duration), this parameter can help you preview their combined impact up to 21 days in advance.

qstringrequired

Your site visitor's search query. Search queries are composed of one or more terms. <br><br> For Category queries, the value is the category ID. <br><br> You can percent encode spaces between terms as %20, or you can leave the spaces unencoded. <br><br> If you use q=\*, the latency of the response will vary depending on your catalog size and it may not adhere to {user.br}'s standard SLA. Additionally, most merchandising operations do not work on \* query parameters, except for include/exclude operations. <br><br> The example value shown here, <i>cable</i>, is included for your convenience to send a request with <b>Try It</b>.

Default "cable"

content_injectionboolean

This parameter enables the [Personalized media in grid](https://documentation.bloomreach.com/discovery/docs/personalized-media-in-the-grid) feature. <br>If `true`, the API response includes media objects along with product results. The content and positions <br>of the media objects are governed by the [assets and media rules](https://documentation.bloomreach.com/discovery/docs/assets-and-media-rules) configured in the {user.br} dashboard.

request_idstring

An ID to track the API request for identification in logs. <br><br> {user.br} doesn't automatically enforce the requirements for this parameter. For example, you can enter `test` as your value for each instance of the request_id parameter without triggering an error message. However, using a unique value (random number/Unix Timestamp) allows us to help you if you encounter a problem.

rowsinteger (int32)

The number of matching items to return per results page in the API response. The maximum value is 200.<br><br>To enhance performance, limit this value to the number of items that you think is reasonable for a single page of search results.

Default 20

sortstring

Sorts results based on the field value in ascending, descending, or another combination of orders. You can sort any fl field. <br><br> Value is a field name, followed by **asc**/**desc** for ascending/descending order, respectively. For example, **sort=sale_price desc** sorts in descending order of the sale price

startinteger (int32)

The number of the first item on a page of results. For example, the first item on the first page is 0, making the start value also 0. <br><br> The maximum value is 10000.

Default 0

stats.fieldstring

This parameter allows you to display the maximum and minimum values of any numeric field in your data set for a user query. With this parameter, you can get all the documents matching a query and display the minimum and maximum values of single-valued, numeric attributes such as price, sale_price, length, width, reviews, etc. <br><br> Values are returned in the response as **stats_field**.

urlstringrequired

The absolute URL of the page where the request is initiated. Do not use a relative URL. <br><br> The example value shown here, <i>https://www.documentation-site.com</i>, is included for your convenience to send a request with <b>Try It</b>.

Default "https://www.documentation-site.com"

user_idstring

The universal customer ID of the user. You only need to pass this field if your particular integration tracks customers this way. The parameter captures user IDs from the customer side, and reuses the information when powering apps or enhancing cross-device linking. In this way, {user.br} recognizes users in a way that's aligned with your system. <br><br> Use an anonymous string. Don't use email or other personally identifiable information. If you do not track users this way, then omit this field.

view_idstring

A unique identifier for a specific view of your product catalog. If you have multiple versions of your site, each with their own product catalog characteristics like product titles and prices, then add view_id to your call. <br><br> {user.br} uses your view_id parameter value to display the right product information for your customers based on their individual site views. You can enter any string value to identify the specific site catalog view. This string must be consistent in your pixel, API, and product catalog.

widget_idstring

The widget_id provided in the Dashboard for the Dynamic Widgets feature, which is used to provided curated results. <br><br> This is an optional feature that can be enabled by discussing with your CSM.

Response

Returns 200 with an object. Read it in later steps with {{getProductsCategories.response.data.<field>}}.

responseobject
maxScorenumber
numFoundnumber
startnumber

The number of the first item on the page of results. When the [Personalized media in grid](https://documentation.bloomreach.com/discovery/docs/personalized-media-in-the-grid) feature is enabled, this reflects the original `start` value sent in the request, not any internally adjusted offset.

insertsnumber

The total number of content rules configured for this request. This field is only present when the [Personalized media in grid](https://documentation.bloomreach.com/discovery/docs/personalized-media-in-the-grid) feature is enabled for the query. It reflects the number of configured rules, not the number of content documents actually injected into this page of results — for example, rules that fall outside the current display window still count toward this total.

docsarray<oneOf>

The list of result documents. When the [Personalized media in grid](https://documentation.bloomreach.com/discovery/docs/personalized-media-in-the-grid) feature is enabled for the query, this array contains both product documents and injected content documents, interleaved according to the configured rules. Use the `docType` field on each document to distinguish products (`product`) from injected content (`content`). When the feature is disabled, the array contains only product documents and the response is identical to the standard format. <br><br>More details on integrating this feature can be found in the [Technical integration guide](https://documentation.bloomreach.com/discovery/docs/technical-integration-media-in-the-grid).

facet_countsobject
facetsarray<object>3 fields
facet_fieldsobject1 fields
facet_queriesobject
facet_rangesobject1 fields
category_mapobject
autoCorrectQuerystring
did_you_meanarray<string>
keywordRedirectobject
original_querystringrequired
redirected_querystringrequired
redirected_urlstringrequired
group_responseobject
statsobject
stats_fieldsobjectrequired2 fields
metadataobject
queryobject2 fields
experimentsarray<object>2 fields
json
{
  "response": {
    "maxScore": 0,
    "numFound": 0,
    "start": 0,
    "inserts": 2,
    "docs": [
      null
    ]
  },
  "facet_counts": {
    "facets": [
      {
        "name": "AverageRating",
        "type": "text",
        "value": [
          {
            "name": "Decent",
            "count": 15,
            "start": 0,
            "end": 0
          }
        ]
      }
    ],
    "facet_fields": {
      "category": [
        {
          "cat_id": "string",
          "cat_name": "string",
          "count": 0,
          "crumb": "string",
          "parent": "string",
          "tree_path": "string"
        }
      ]
    },
    "facet_queries": {},
    "facet_ranges": {
      "price": [
        {
          "count": 0,
          "end": 0,
          "start": 0
        }
      ]
    }
  },
  "category_map": {},
  "autoCorrectQuery": "string",
  "did_you_mean": [
    "string"
  ],
  "keywordRedirect": {
    "original_query": "string",
    "redirected_query": "string",
    "redirected_url": "string"
  },
  "group_response": {},
  "stats": {
    "stats_fields": {
      "price": {
        "max": 0,
        "min": 0
      },
      "sale_price": {
        "max": 0,
        "min": 0
      }
    }
  },
  "metadata": {
    "query": {
      "query_tags": {
        "untagged_tokens": [
          "string"
        ]
      },
      "precision": {
        "configured": {
          "value": "string"
        },
        "applied": {
          "value": "string"
        }
      }
    },
    "experiments": [
      {
        "ab_test_experiment_name": "string",
        "ab_test_variant_name": "string"
      }
    ]
  }
}

Need more? See the Bloomreach Discovery guide for connection setup and behaviour shared by every action.