shop.category.update
Updates information about the specified product category.
Parameters
-
id
GET
Category ID.
-
parent_id
POST
Optional
Parent category ID. If not specified, 0 is used by default.
-
depth
POST
Optional
Nesting level in category hierarchy.
-
meta_title
POST
Optional
TITLE element for category page.
-
meta_keywords
POST
Optional
META keywords.
-
meta_description
POST
Optional
META description.
-
url
POST
Optional
URL of category page in storefront.
-
description
POST
Optional
Description.
-
conditions
POST
Optional
Products selection conditions string for dynamic categories, in which individual parameters are separated from each other with an ampersand.
Examples of parameters:
— create_datetime>=2022-10-13 (beginning of the period to check product creation dates)
— create_datetime<=2022-10-15 (end of the period to check product creation dates)
— price>=100 (beginning of the values range to check product prices)
— price<=200 (end of the values range to check product prices)
— compare_price>=200 (beginning of the values range to check product strike-through prices)
— compare_price<=300 (end of the values range to check product strike-through prices)
— purchase_price>=50 (beginning of the values range to check product purchase prices)
— purchase_price<=70 (end of the values range to check product purchase prices)
— edit_datetime>=2022-10-01 (beginning of the period to check last product editing date)
— edit_datetime<=2022-10-10 (end of the period to check last product editing date)
— rating>=3 (beginning of the values range to check product ratings)
— rating<=5 (end of the values range to check product ratings)
— type=14||13 (IDs of product types)
— count>=5 (beginning of the values range to check product stock quantities)
— count<=100 (end of the values range to check product stock quantities)
— badge=lowprice||bestseller (product badges’ IDs)
— brand.value_id=159,190 (IDs of values of a product feature with the 'brand' identifier) -
filter
POST
Optional
Products filter setup parameters, in the form of a string containing filter field identifiers separated by commas. As identifiers can be used numeric IDs of product features, and the 'price' string for the filter by price. The sort order of the field identifiers corresponds to the sort order of filter fields.
-
sort_products
POST
Optional
Default product sorting rule composed of a product field name followed by a space and a direction value; e.g., 'name ASC', 'price DESC'.
Available list of product sorting rules:
— name ASC (by name)
— price DESC (most expensive)
— price ASC (least expensive)
— rating DESC (highest rated)
— rating ASC (lowest rated)
— total_sales DESC (bestsellers by sold amount)
— total_sales ASC (worst sellers)
— count DESC (in stock)
— create_datetime DESC (date added)
— stock_worth DESC (stock net worth)
An empty value corresponds to manual sort order defined in the store backend, only for static categories. -
include_sub_categories
POST
Optional
Flag (0 or 1) requiring to display products from subcategories.
-
status
POST
Optional
Category status. 0: hidden, 1: visible in storefront.
-
format
GET
Optional
Sets response format. Available options:
json
(default),xml
.
Return value
Category data array with the following keys:
- id int Category ID.
- depth int Category nesting depth starting with 0.
- parent_id int ID of category’s parent category or 0 if there is no parent category.
- name string Category name.
- meta_title string Value of the <TITLE> tag.
- meta_keywords string Value of the keywords meta tag.
- meta_description string Value of the description meta tag.
- type int Category type: 0 (static), 1 (dynamic).
- url string Category’s editable URL part used in the storefront.
- full_url string Category’s relative URL including the URLs of its parent categories.
- count int Number of products for which the current category is selected as the main category. Not used for dynamic categories.
- description string Category description.
- conditions string Description of product selection rules for dynamic categories. Not used for static categories.
- create_datetime datetime Category’s creation date and time.
- edit_datetime datetime Category’s last editing date and time.
- filter string Information about product filter setup, in the form of filter field identifiers separated by commas. As identifiers can be used numeric IDs of product features, and the 'price' string for the filter by price. The sort order of the field identifiers corresponds to the sort order of filter fields.
- sort_products string Default product sorting rule.
- include_sub_categories int Flag (0 or 1) denoting whether products included in the category’s sub-categories must also be displayed in the current category.
- status int Category visibility status: 0 (hidden), 1 (visible).