For the complete documentation index, see llms.txt. This page is also available as Markdown.

Partially update a product collection widget

Updates one or more fields of a product collection widget. Fields left out keep their current value.

Important: widget_type and attributes are required. Send the current values when they are not meant to change. The stored attributes are replaced by the object sent.

Localizable attributes are written in the language active for the request — see IGNORE_ACCEPT_LANGUAGE_HEADER in the section introduction.

patch
/product_collection_widgets/{id}/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Path parameters
idintegerRequired

The unique identifier of the product collection widget.

Body

Request body for partially updating a product collection widget. widget_type and attributes must always be included; every other field is optional and keeps its stored value when left out.

namestring · max: 255Optional

The display name of the widget.

slugstring · max: 255Optional

The identifier storefront templates use to render the widget. Must not already belong to another CMS widget.

templatestring · max: 512Optional

The path of the template that renders the widget.

widget_typeintegerRequired

The identifier of the widget type. Always required — the attribute keys are validated against it.

Example: 3
product_collectionintegerOptional

The identifier of the product collection whose products the widget shows.

product_limitinteger · min: 1Optional

The maximum number of products the widget shows.

extraction_strategystring · nullableOptional

The extraction strategy, given by its name or its value, or null for the default strategy.

Responses
200

The updated product collection widget.

application/json

A product collection widget — a CMS widget that renders products from a product collection.

pkintegerRead-onlyOptional

The unique identifier of the widget.

created_datestring · date-timeRead-onlyOptional

When the widget was created.

modified_datestring · date-timeRead-onlyOptional

When the widget was last modified.

namestring · max: 255Optional

The display name of the widget.

Example: Summer Picks
slugstring · max: 255Optional

The identifier storefront templates use to render the widget. Unique across all CMS widgets.

Example: summer-picks
widget_typeintegerOptional

The identifier of the widget type whose schema defines the accepted attributes.

Example: 3
templatestring · max: 512Optional

The path of the template that renders the widget.

Example: widgets/product-carousel.html
product_collectionintegerOptional

The identifier of the product collection whose products the widget shows.

Example: 12
product_limitinteger · min: 1Optional

The maximum number of products the widget shows.

Example: 10
extraction_strategystring,null · enum · nullableOptional

The value of the extraction strategy, or null when the default strategy is used. See Extraction Strategies in the section introduction.

Example: omnishop.search.strategies.FirstItemSearchExtractionStrategyPossible values:
patch/product_collection_widgets/{id}/
PATCH /api/v1/remote/1/product_collection_widgets/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 169

{
  "name": "text",
  "slug": "text",
  "template": "text",
  "widget_type": 3,
  "attributes": {
    "title": "Summer Picks"
  },
  "product_collection": 1,
  "product_limit": 1,
  "extraction_strategy": null
}
{
  "pk": 1,
  "created_date": "2026-01-01T00:00:00.000Z",
  "modified_date": "2026-01-01T00:00:00.000Z",
  "attributes": {
    "title": "Summer Picks",
    "layout": "carousel"
  },
  "name": "Summer Picks",
  "slug": "summer-picks",
  "widget_type": 3,
  "template": "widgets/product-carousel.html",
  "attributes_kwargs": {
    "layout": {
      "value": "carousel",
      "data_type": "dropdown"
    }
  },
  "product_collection": 12,
  "product_limit": 10,
  "extraction_strategy": "omnishop.search.strategies.FirstItemSearchExtractionStrategy"
}

Last updated

Was this helpful?