POST
/
apis
/
ecommerce-service
/
public
/
recommendation
/
v2
/
widgets
/
{widgetId}
Get Recommendations for a Widget Context
curl --request POST \
  --url https://{base-address}/apis/ecommerce-service/public/recommendation/v2/widgets/{widgetId} \
  --header 'Content-Type: application/json' \
  --data '{
  "context_type": "<string>",
  "context_data": "<string>",
  "product_ids": [
    "<string>"
  ],
  "category_ids": [
    "<string>"
  ],
  "user_id": "<string>",
  "filter": [
    {
      "group": {
        "operator": "<string>",
        "rules": [
          {
            "action": "<string>",
            "field_name": "<string>",
            "value": "<string>"
          }
        ]
      }
    }
  ]
}'
{
  "Status": "success",
  "Data": {
    "records": [
      {
        "id": "<string>",
        "tenant_id": "<string>",
        "workspace_id": "<string>",
        "content_model_id": "<string>",
        "content_model_data_id": "<string>",
        "version_no": 123,
        "version_name": "<string>",
        "language": [
          "<string>"
        ],
        "modified_by": "<string>",
        "modified_at": "2023-11-07T05:31:56Z",
        "created_by": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "store_id": "<string>",
        "channel_id": [
          "<string>"
        ],
        "_version_": "<string>",
        "in_stock": 123,
        "brand_page_slug": "<string>",
        "revenue": 123,
        "category_ids": [
          "<string>"
        ],
        "variants_sku_count": 123,
        "sku_for_analytics": [
          "<string>"
        ],
        "provider": "<string>",
        "provider_id": "<string>",
        "images": [
          {
            "id": "<string>",
            "product_id": "<string>",
            "is_thumbnail": true,
            "sort_order": 123,
            "description": "<string>",
            "image_file": "<string>",
            "url_zoom": "<string>",
            "url_standard": "<string>",
            "url_thumbnail": "<string>",
            "url_tiny": "<string>",
            "date_modified": "2023-11-07T05:31:56Z"
          }
        ],
        "price": 123,
        "description": "<string>",
        "sku": "<string>",
        "type": "<string>",
        "name": "<string>",
        "page_slug": "<string>",
        "page_title": "<string>",
        "menu_title": "<string>",
        "condition": [
          "<string>"
        ],
        "sort_order": 123,
        "is_price_hidden": true,
        "availability": "<string>",
        "upc": "<string>",
        "warranty": "<string>",
        "is_featured": true,
        "is_visible": true,
        "is_free_shipping": true,
        "fixed_cost_shipping_price": 123,
        "inventory_tracking": "<string>",
        "inventory_warning_level": 123,
        "inventory_level": 123,
        "brand": "<string>",
        "brand_id": "<string>",
        "product_tax_code": "<string>",
        "tax_class_id": "<string>",
        "map_price": 123,
        "sale_price": 123,
        "retail_price": 123,
        "cost_price": 123,
        "height": 123,
        "depth": 123,
        "width": 123,
        "weight": 123
      }
    ],
    "_meta_": {
      "tenant_id": "<string>",
      "workspace_id": "<string>",
      "env_type": "<string>",
      "store_hash": "<string>",
      "content_model_id": "<string>",
      "_fields_": {}
    }
  }
}
Before calling this endpoint, make sure you’ve generated an API token and picked the correct domain. See Authentication & Base URLs.

Headers

x-customer-group-id
string

Optional customer group identifier for segment-specific responses.

x-ecomm-provider
string

E-commerce provider for contextualizing the API call (e.g., shopify, magento, etc.).

Path Parameters

widgetId
string
required

Unique identifier of the widget to retrieve.

Query Parameters

fields
string
required

Comma-separated list of fields to include in the response

locale
string
required

Specifies the language or region for the response data

store_id
string

Identifier of the store within the e-commerce platform.

channel_id
string

Sales or distribution channel identifier.

location_id
string

Identifier for the regional location from the BigCommerce admin panel.

currency
string

Currency code for price displays.

include_fields_meta
boolean

Whether to include metadata about the fields in the response. If true, returns metadata for each filterable field.

skip
integer

Number of items to skip for pagination offset.

limit
integer

Maximum number of items to return.

Body

application/json

Response

200
application/json

A list of recommended products with optional metadata.

The response is of type object.