openapi: 3.1.0
info:
title: Recommendations and Pathways API
version: "2.0"
paths:
"/keyword/{widget_id}":
get:
tags: [Keyword-based widget]
summary: Keyword widget
operationId: keyword-based-widget-api
parameters:
- $ref: "#/components/parameters/WidgetId"
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/BrUid"
- $ref: "#/components/parameters/DomainKey"
- name: query
in: query
description: |
Your site visitor's search query. Search queries are composed of one or more terms.
You can percent encode spaces between terms as %20, or you can leave the spaces unencoded.
The example value shown here, cable, is included for your convenience to send a request with Try It.
required: true
example: pricing
schema:
type: string
default: cable
- $ref: "#/components/parameters/RequestId"
- $ref: "#/components/parameters/Url"
- $ref: "#/components/parameters/RefUrl"
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Filter"
- name: facet
in: query
description: |
Facets are disabled by default. To enable facets, set **facet=true**.
schema:
type: boolean
default: false
- name: filter_facet
in: query
description: |
With the filter parameter, after a user selects a facet value for filtering, the other facet values in that field are not returned by the API and are no longer visible.
The filter_facet parameter allows other facet values to be returned after a facet value has been selected.
`filter_facet` doesn't support complex boolean operations, but they can be supported by including both `filter` and `filter_facet`.
Note that the attributes used in filter will not return all values after the user selects a facet value in that field.
Example values:
Single filter with multiple values
**&filter_facet=color:"red" OR "purple"**
Multiple filters on different attributes
**&filter_facet=color:"red"&filter_facet=brand:"Bloomreach"**
schema:
type: string
- name: start
in: query
description: |
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.
The maximum value is 10000.
schema:
type: integer
format: int32
- $ref: "#/components/parameters/ContentInjection"
- $ref: "#/components/parameters/Rows"
- $ref: "#/components/parameters/ViewId"
- name: user_id
in: query
description: |
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.
This way, Bloomreach recognizes users in a way that's aligned with your system.
Use an anonymous string. Don't use email or other personally identifiable information.
schema:
type: string
"/item/{widget_id}":
get:
tags: [Item-based recommendation widget]
summary: Item-based widget
operationId: item-based-recommendation-widget-api
parameters:
- $ref: "#/components/parameters/WidgetId"
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/BrUid"
- $ref: "#/components/parameters/DomainKey"
- name: item_ids
in: query
description: |
Specifies access to a particular set of items. For the product catalog, this would be the PID(s).
The example value shown here, 61d87251460d4a01f7c82608, is included for your convenience to send a request with Try It.
required: true
example: "61d87251460d4a01f7c82608"
schema:
type: string
default: "61d87251460d4a01f7c82608"
- $ref: "#/components/parameters/RequestId"
- $ref: "#/components/parameters/Url"
- $ref: "#/components/parameters/RefUrl"
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Filter"
- $ref: "#/components/parameters/ContentInjection"
- $ref: "#/components/parameters/Rows"
- $ref: "#/components/parameters/ViewId"
- name: context_pids
in: query
description: |
`context_pids` takes a single product ID for producing Context-based merchandising results for the widget.
Contextual Merchandising uses Context PID as a primary input for generating the recall set of the widget results.
If not enough results are produced based on `context_pids`, the system depends on Item ID(s) as a fallback to fill the widget's recall set.
Note: In case `context_pids` isn't provided, the system will use Item ID(s) to produce Contextual Merchandising results for the widget.
You can find more information on Contextual Merchandising in [the feature guide](https://documentation.bloomreach.com/discovery/docs/contextual-merchandising).
schema:
type: string
default: "61d87251460d4a01f7c82608"
- name: user_id
in: query
description: |
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. This way, Bloomreach recognizes users in a way that's aligned with your system.
Use an anonymous string. Don't use email or other personally identifiable information.
schema:
type: string
deprecated: false
"/category/{widget_id}":
get:
tags: [Category-based widget]
summary: Category widget
operationId: category-based-widget-api
parameters:
- $ref: "#/components/parameters/WidgetId"
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/BrUid"
- $ref: "#/components/parameters/DomainKey"
- name: cat_id
in: query
description: |
Your site's category ID.
The example value shown here, pnb160000000000, is included for your convenience to send a request with Try It.
required: true
example: pnb160000000000
schema:
type: string
default: pnb160000000000
- $ref: "#/components/parameters/RequestId"
- $ref: "#/components/parameters/Url"
- $ref: "#/components/parameters/RefUrl"
- $ref: "#/components/parameters/ViewId"
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Filter"
- name: facet
in: query
description: |
Facets are disabled by default. To enable facets, set **facet=true**.
schema:
type: boolean
default: false
- name: filter_facet
in: query
description: |
With the filter parameter, after a user selects a facet value for filtering, the other facet values in that field are not returned by the API and are no longer visible.
The `filter_facet` parameter allows other facet values to be returned after a facet value has been selected.
`filter_facet` doesn't support complex boolean operations, but they can be supported by including both `filter` and filter_facet`.
Note that the attributes used in `filter` will not return all values after the user selects a facet value in that field.
Example values:
Single filter with multiple values
**&filter_facet=color:"red" OR "purple"**
Multiple filters on different attributes
**&filter_facet=color:"red"&filter_facet=brand:"Bloomreach"**
schema:
type: string
- name: start
in: query
description: |
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.
The maximum value is 10000.
example: 0
schema:
type: integer
format: int32
default: 0
- $ref: "#/components/parameters/ContentInjection"
- $ref: "#/components/parameters/Rows"
- name: user_id
in: query
description: |
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.
This way, Bloomreach recognizes users in a way that is aligned with your system.
Use an anonymous string. Don't use email or other personally identifiable information.
schema:
type: string
"/personalized/{widget_id}":
get:
tags: [Personalization-based widgets]
summary: Personalized widget
operationId: personalization-based-widget-api
parameters:
- $ref: "#/components/parameters/WidgetId"
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/BrUid"
- $ref: "#/components/parameters/DomainKey"
- name: query
in: query
description: |
Your site visitor's search query. Search queries are composed of one or more terms.
You can percent encode spaces between terms as `%20`, or you can leave the spaces unencoded.
The example value shown here, cable, is included for your convenience to send a request with Try It.
required: true
example: cable
schema:
type: string
default: cable
- name: user_id
in: query
description: |
The universal customer ID of the user. Required for Personalization-based widgets.
The parameter captures user IDs from the customer side and reuses the information when powering apps or enhancing cross-device linking.
This way, Bloomreach recognizes users in a way that's aligned with your system.
Use an anonymous string. Don't use email or other personally identifiable information.
The example value shown here, abc123, is included for your convenience to send a request with Try It.
required: true
example: abc123
schema:
type: string
default: abc123
- $ref: "#/components/parameters/RequestId"
- $ref: "#/components/parameters/Url"
- $ref: "#/components/parameters/RefUrl"
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Filter"
- $ref: "#/components/parameters/ContentInjection"
- $ref: "#/components/parameters/Rows"
- $ref: "#/components/parameters/ViewId"
deprecated: false
"/global/{widget_id}":
get:
tags: [Global recommendations widget]
summary: Global widget
operationId: global-recommendation-widget-api
parameters:
- $ref: "#/components/parameters/WidgetId"
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/BrUid"
- $ref: "#/components/parameters/DomainKey"
- $ref: "#/components/parameters/RequestId"
- $ref: "#/components/parameters/Url"
- $ref: "#/components/parameters/RefUrl"
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Filter"
- $ref: "#/components/parameters/ContentInjection"
- $ref: "#/components/parameters/Rows"
- $ref: "#/components/parameters/ViewId"
deprecated: false
"/personalized/{recently_viewed_widget_id}":
get:
tags: [Personalization-based widgets]
summary: Recently viewed widget
operationId: recently-viewed-widget-api
parameters:
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/BrUid"
- $ref: "#/components/parameters/DomainKey"
- name: recently_viewed_widget_id
in: path
description: |
The ID of the Recently Viewed widget, which can be found in the [Widget Configurator](https://documentation.bloomreach.com/discovery/docs/widget-configurator) in the Dashboard.
The example value shown here, 1jwy7eg9, is included for your convenience to send a request with Try It.
schema:
type: string
default: 1jwy7eg9
required: true
example: 1jwy7eg9
- $ref: "#/components/parameters/RequestId"
- $ref: "#/components/parameters/Url"
- $ref: "#/components/parameters/RefUrl"
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Filter"
- $ref: "#/components/parameters/ContentInjection"
- $ref: "#/components/parameters/Rows"
- $ref: "#/components/parameters/ViewId"
- name: auth_key
in: query
description: |
The Bloomreach-provided authentication key for the Bloomreach account that's sending the request.
Widget API calls are client-side, so you can leave `auth_key` empty.
schema:
type: string
- name: user_id
in: query
description: |
The universal customer ID of the user. Required for Personalization-based Recommendation widgets.
The parameter captures user IDs from the customer side and reuses the information when powering apps or enhancing cross-device linking.
This way, Bloomreach recognizes users in a way that's aligned with your system.
Use an anonymous string. Don't use email or other personally identifiable information.
The example value shown here, abc123, is included for your convenience to send a request with Try It.
schema:
type: string
default: abc123
- name: start
in: query
description: |
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.
The maximum value is 10000.
example: 0
schema:
type: integer
format: int32
default: 0
responses:
"200":
description: "200"
content:
application/json:
examples:
Result:
value: |-
{
"response": {
"start": 0,
"rows": 2,
"docs": [
{
"pid": "prod1243",
"url": "some url",
"sale_price": 34.2,
"title": "some title"
},
{
"pid": "prod453",
"url": "some url",
"sale_price": 124.2,
"title": "some title"
}
]
},
"facet": {
"category": [
{
"count": 44,
"cat_id": "cat id",
"cat_name": "home",
"children": [
{
"count": 21,
"cat_id": "cat id",
"cat_name": "mens",
"children": [
{
"count": 12,
"cat_id": "cat_id",
"cat_name": "men's shirts",
"children": null
},
{
"count": 9,
"cat_id": "cat_id",
"cat_name": "men's t-shirts",
"children": null
}
]
},
]
},
],
"fields":[
{
"key": "Size",
"type": "text",
"value": [],
},
{
"key": "Color",
"type": "number",
"value":[]
},
{
"key": "sale_price_test",
"type": "number_range",
"value": []
}
],
}
"metadata": {
"widget": {
"rid": "some id",
"id": "some id",
"type": "mlt",
"description": "some text",
"name": "some text"
},
"query": {
"did_you_mean": [
"black",
"block"
],
"modification": {
"mode": "autoCorrectQuery",
"value": "black"
}
},
"response": {
"personalized_results": false,
"fallback": "mlt"
}
}
}
schema:
type: object
properties:
response:
type: object
properties:
start:
type: integer
example: 0
default: 0
rows:
type: integer
example: 2
default: 0
docs:
type: array
items:
type: object
properties:
pid:
type: string
example: prod1243
url:
type: string
example: some url
sale_price:
type: number
example: 34.2
default: 0
title:
type: string
example: some title
facet:
type: object
properties:
ranges:
type: array
required: false
items:
type: object
properties:
key:
type: string
example: slider_price
value:
type: array
items:
type: object
properties:
count:
type: integer
example: 10
default: 0
start:
type: integer
example: 0
default: 0
end:
type: integer
example: 500
default: 0
fields:
type: array
items:
type: object
properties:
key:
type: string
example: colour
type:
type: string
enum: [number, number_range, text]
example: number_range
value:
type: array
items:
type: object
properties:
start:
type: integer
example: 1
end:
type: integer
example: 25
count:
type: integer
example: 231
default: 0
name:
type: string
example: black
category:
type: array
items:
type: object
properties:
count:
type: integer
example: 12
default: 0
cat_id:
type: string
example: some id
cat_name:
type: string
example: sale
children:
type: array
items:
type: string
example: empty_arry
query: {}
metadata:
type: object
properties:
widget:
type: object
properties:
rid:
type: string
example: some id
id:
type: string
example: some id
type:
type: string
example: mlt
description:
type: string
example: some text
name:
type: string
example: some text
query:
type: object
properties:
did_you_mean:
type: array
items:
type: string
example: black
modification:
type: object
properties:
mode:
type: string
example: autoCorrectQuery
value:
type: string
example: black
response:
type: object
properties:
personalized_results:
type: boolean
example: false
default: true
fallback:
type: string
example: mlt
"400":
description: "400"
content:
application/json:
examples:
Result:
value: Incorrect/Invalid query params.
"401":
description: "401"
content:
application/json:
examples:
Result:
value: An invalid auth-key is passed with the request.
"404":
description: "404"
content:
application/json:
examples:
Result:
value: "The widget ID is not valid.\n\n"
deprecated: false
"/visual/upload/{widget_id}":
post:
tags:
- Visual search
summary: Upload image
operationId: upload-api
deprecated: false
parameters:
- $ref: "#/components/parameters/WidgetId"
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/DomainKey"
- name: auth_key
in: query
description: |
The unique key shared during the integration phase. This is used to authenticate your API call.
schema:
type: string
required: false
- name: Content-Disposition
description: |
This specifies the form field as "image" and the suggested filename of the image being uploaded.
Example syntax: `Content-Disposition: form-data; name="image"; filename="filename.jpg"`
in: header
schema:
type: string
default: form-data; name="image"; filename="filename.jpg"
required: true
example: form-data; name="image"; filename="filename.jpg"
- name: Content-Type
description: |
This header specifies the media type (image) and format. We accept all image formats - jpg, png, jpeg, webp.
Example syntax: `Content-Type: image/jpeg`
in: header
schema:
type: string
default: image/jpeg
required: true
example: image/jpeg
"/visual/search/{widget_id}":
get:
tags:
- Visual search
summary: Run visual search
operationId: visual-search-response-api
deprecated: false
parameters:
- $ref: "#/components/parameters/WidgetId"
- $ref: "#/components/parameters/AccountId"
- $ref: "#/components/parameters/BrUid"
- $ref: "#/components/parameters/DomainKey"
- $ref: "#/components/parameters/Url"
- $ref: "#/components/parameters/Fields"
- $ref: "#/components/parameters/Filter"
- $ref: "#/components/parameters/ContentInjection"
- $ref: "#/components/parameters/Rows"
- name: image_id
in: query
description: |
You’ll get this value in the Upload API response once an image is uploaded.
You can use `image_id` to make any number of subsequent queries for widget responses (with different parameters/filters and objects) without the need to re-upload.
schema:
type: string
default: str123
required: false
example: str123
- name: item_ids
in: query
description: |
Item ID/PID of the item for which you want visual recommendations.
Passing this parameter makes it a [Visual Recommendations](https://documentation.bloomreach.com/discovery/reference/visual-search-response-api#visual-recommendations-api) request.
schema:
type: string
default: pid123
required: false
example: pid123
- name: sku_id
in: query
description: |
If you have SKUs in the catalog, `sku_id` should be passed, else this can be skipped.
schema:
type: string
required: false
- name: object_id
in: query
description: |
By default, you will get the recommendations for the whole image you uploaded if you make an API call without the object_id [denoted by -1].
To get more targeted results, you can also make API calls specific to an `object_id`.
schema:
type: int32
required: false
- name: auth_key
in: query
description: |
The unique key shared during the integration phase. This is used to authenticate your API call.
schema:
type: string
required: false
components:
parameters:
WidgetId:
name: widget_id
in: path
description: |
The ID of the widget, which can be found in the [Widget Configurator](https://documentation.bloomreach.com/discovery/docs/widget-configurator) in the Dashboard.
The example value shown here, 1jwy7eg9, is included for your convenience to send a request with Try It.
schema:
type: string
default: 1jwy7eg9
required: true
example: 1jwy7eg9
ContentInjection:
name: content_injection
in: query
description: |
This parameter enables the [Personalized media in grid](https://documentation.bloomreach.com/discovery/docs/personalized-media-in-the-grid) feature.
If `true`, the API response includes media objects along with product results.
The content and positions 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 Bloomreach dashboard.
required: false
example: true
schema:
type: boolean
AccountId:
name: account_id
in: query
description: |
Your site's numerical Bloomreach account ID.
Your Bloomreach representative gives your site's account ID to you before or during your integration kickoff meeting.
The example value shown here, 6276, is included for your convenience to send a request with Try It.
required: true
example: 6276
schema:
type: integer
format: int32
default: 6276
BrUid:
name: _br_uid_2
in: query
description: |
A first-party cookie created by the Bloomreach tracking pixel library (BrTrk).
This cookie creates a unique, anonymous identifier for every browser or device.
Use the default value provided, which is already encoded.
required: true
example: "uid%3D7797686432023%3Av%3D11.5%3Ats%3D1428617911187%3Ahc%3D55"
schema:
type: string
default: "uid%3D7797686432023%3Av%3D11.5%3Ats%3D1428617911187%3Ahc%3D55"
DomainKey:
name: domain_key
in: query
description: |
Your site domain's ID, which is provided by Bloomreach. This ID is for the domain that you want to receive your Bloomreach API requests.
This parameter identifies the specific site version when one account ID hosts multiple site versions with unique characteristics, such as language versions.
The example value shown here, bloomreach_devdocs, is included for your convenience to send a request with Try It.
required: true
example: bloomreach_devdocs
schema:
type: string
default: bloomreach_devdocs
RequestId:
name: request_id
in: query
description: |
An ID to track site visitor clicks. We recommend that you generate unique, random values of 13 digits to enable click-tracking.
The `request_id` is also important for debugging.
required: true
example: abh3kjh1kjnd8
schema:
type: string
default: abh3kjh1kjnd8
Url:
name: url
in: query
description: |
The absolute URL of the page where the request is initiated. Don't use a relative URL.
The example value shown here, https://www.documentation-site.com, is included for your convenience to send a request with Try It.
required: true
example: https://www.documentation-site.com
schema:
type: string
default: https://www.documentation-site.com
Fields:
name: fields
in: query
description: |
A comma-separated list of fields to be sent in the request.
Alternatively, you may configure the fields in the [Widget Configurator](https://documentation.bloomreach.com/discovery/docs/widget-configurator) in the Dashboard instead.
This parameter is required if not sent via the Dashboard.
schema:
type: string
Filter:
name: filter
in: query
description: |
The filter parameter applies a faceted filter to the returned products, searching for products that fit your parameter values.
Any facet that you want to filter must be in your feed. Attributes must be enabled and mapped by Bloomreach.
Let your Bloomreach representative know which attributes in your content feed you want to apply as filters to search results.
You can filter results based on numeric ranges. For example, `&filter=(price:["100" TO "*"])`.
Note that a negative filter on ranges isn't supported.
To provide multiple filters, send multiple filter parameters.
For example, `&filter=(price:["*" TO "100"])&filter=(color_groups: ("blue"))`.
schema:
type: string
RefUrl:
name: ref_url
in: query
description: |
The URL of the page or HTTP referrer where the request is started.
Required if you want to use [Targeting](https://documentation.bloomreach.com/discovery/docs/targeting).
schema:
type: string
Rows:
name: rows
in: query
description: |
The number of matching items to return per results page in the API response. The maximum value is 200.
The result size is used from the Dashboard if it isn't sent in the API.
To enhance performance, limit this value to the number of items that you think is reasonable for a single page of search results.
schema:
type: integer
format: int32
ViewId:
name: view_id
in: query
description: |
A unique identifier for a specific view of your product catalog.
If you have multiple versions of your site, each with its own product catalog characteristics like product titles and prices, then add `view_id` to your call.
Bloomreach 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.
schema:
type: string
servers:
- url: https://pathways.dxpapi.com/api/v2/widgets
x-readme:
headers: []
explorer-enabled: true
proxy-enabled: true
samples-enabled: true
x-readme-fauxas: true