Skip to main content

GET a list of products in the specified category, including subcategories, and filter by the specified attributes

GET 

/v/cpc/:categoryId

This API endpoint allows you to retrieve a list of all available PIMS products in the system or select products within a specific category, including subcategories. You can also filter these products based on attribute values or search phrases within attribute values.

  • If you want to retrieve all products within the PIMS system, set the category identifier to "0".
  • To include subcategories in the displayed list of items, set the includeChildren parameter to true.
  • To include all variants sku products in the displayed list of items, set the includeVariants parameter to true.
  • For filtering results based on attribute values, provide the attribute name and its corresponding value. You can apply multiple filters simultaneously.
  • Use the search parameter to search for products based on a specified search phrase. The search is conducted across all words within the phrase.

Returns


The endpoints returns detailed information about products that belong to the corresponding category and have attributes with specified filter values, along with comprehensive details about the indicated category and structured data of its child categories

This endpoint is especially useful for those who need quick access to a list of all available products in the system, and is a valuable tool for developers and other users wishing to create applications or analyze product-related data.

Request

Path Parameters

    categoryId integerrequired

    unique category identifier, set to "0" if you want all products

Query Parameters

    filters string[]

    if FilterParams is set. Attribute names for filtering products.

    FilterParams object

    Attribute names and their values for filtering products. All attribute names that you add to this field should also be listed in the filters parameter. The required input value templates are as follows:

    • For multiple values, separate them using '|'

    • For a value range, separate the maximum and minimum values using ';;'

      the values in the range must consist only of digits and periods (0-9, '.')

      example: { "brand": "YourBrand1|YourBrand2", "price": "10.50;;25.00", "status": "active" }

    search string

    Search phrase for searching within attribute values

    includeChildren string

    Possible values: Value must match regular expression ^(true|false)?$

    Default value: true

    Controls the display of a product list, including its subcategories (children).

    Set the value to true to enable this parameter and include subcategories in the displayed list of products

    includeVariants string

    Possible values: Value must match regular expression ^(true|false)?$

    Controls the display of a product list, including its all variants sku products.

    Set the value to true to enable this parameter and include subcategories in the displayed list of products

    order-by string[]

    Possible values: Value must match regular expression ^\w+\|(asc|desc)$

    Sorting field and the sorting order for this field, separator '|'
    example order by SKU in ascending order: sku|asc

    pageSize integer

    The number of items per page

    pageNum integer

    The page number

Header Parameters

    ApiView string

    View name from the PIM's view Dictionary. ✔If the ApiView parameter is not passed- data is returned according to default View defined for access group.

Responses

success

Schema
    currentCategory object[]
  • Array [
  • id integerrequired

    Automatically calculated value that represents a unique PIMS internal category ID. You can use to retrieve more details about the category.

    cat_name stringrequired

    The name of the category identified by categoryId.

    cat_parent_id integerrequired

    The relative path of the category that is calculated and uses '>' as a separator for the unique category ID.

    cat_path_id stringrequired

    The calculated relative path of the category, uses '>' as a unique category ID separator.

    cat_path stringrequired

    The calculated relative path of the category, uses '>' as a category name separator.

    cat_data objectrequired

    Metadata associated with the category. Extendable

    status string

    Describes the activity status of the category. In the context of GET API requests, categories are filtered based on their status, and only categories with the active status will be returned. If the status is not explicitly specified, the category is considered active by default and will be included in the query results.

    cat_image string

    The path for the image of the category.

    cat_rank integer

    A numerical classification for the category's rank.

    cat_filters object[]

    Is an array of filters used to filter data by attribute products in this category, and its structure and number of elements depend on the PIM settings. The following is an example of one possible structure.

  • Array [
  • anyOf
    filter_name stringrequired

    The name of the filter.

    filter_values object[]required

    An array of values for the filter, with each item having a "label" and "value" option.

  • Array [
  • label stringrequired

    The label option for the filter value.

    value stringrequired

    The value option for the filter value.

  • ]
  • filter_var stringrequired

    The attribute name by which products will be filtered within this category.

    filter_type stringrequired

    Possible values: [multiselect, dropdown]

    The type of the filter.

  • ]
  • ]
  • childCategories object[]

    Structured category data for children of current category

  • Array [
  • cat_rank integer

    A numerical classification for the category's rank.

    cat_order integer

    The proper sorting order for the categories when displayed in a user interface.

    id integerrequired

    Automatically calculated value that represents a unique PIMS internal category ID. You can use to retrieve more details about the category.

    cat_name stringrequired

    The name of the category identified by categoryId.

    cat_data objectrequired
    cat_image string

    The path for the image of the category.

  • ]
  • products object[]required

    Collection objects Product

  • Array [
  • data objectrequired
    attributes object

    Detailed information about the product, its variants, their corresponding attributes, and values

    sku string

    Unique product code or number.

    categories string[]

    Collection of categories that the product is assigned to.

    Presented the relative path of the category that is calculated and uses '>' as a separator for the category name.

    status string

    Status of the product. Can only take the following values: active, inactive, deleted.

    thumbnail string

    Link to internal or external image asset in the form of a url.

    title string

    Short description of the product.

    price string

    Presented as a recommended attribute

    rod_diameter string

    It can be any attribute from your Pims system. The attribute 'rod_diameter' is provided here as an example for the variation SKU.

    variation_attributes string[]

    Collection of attributes for the current product and the SKUs in the variation_skus collection. The values of these attribute data are set as variations of the product.

    variation_of string

    Collection of sku's that are variations of the current product. This field value is automatically maintained by the PIMS.

    variation_skus string[]

    List of sku's that are variations of the current product. This field value is automatically maintained by the PIMS.

    variation_matrix object

    A JSON object in which the variation SKUs act as keys, and their attribute-value pairs act as values. It represents dynamic data that can vary depending on the product and its variations.

    The following JSON schema is provided as an example only, where:

    Part-number01, Part-number02- are the variation SKU keys.

    rod_diameter- is an attribute of the variation SKUs, which can be any attribute from your Pims system. The attribute 'rod_diameter' is provided here as an example.

    Part-number01 object
    rod_diameter string[]
    Part-number02 object
    rod_diameter string[]
    Part-number00 object
    rod_diameter string[]
    sku stringrequired

    Unique product code or number.

  • ]
  • definition objectrequired

    Complete information about the structure of each attribute in the PIMs system.

    status object
    type stringrequired
    collection string
    isUnique string
    label objectrequired
    en-us stringrequired
    validation string
    isSearchable string
    isIndexable string
    isFilterable string
    group string
    comment objectrequired
    en-us stringrequired
    variation_skus object
    isUnique string
    dictionaryIsStatic string
    comment objectrequired
    en-us stringrequired
    value string
    collection string
    isIndexable string
    label objectrequired
    en-us stringrequired
    validation string
    group string
    type stringrequired
    isSearchable string
    isSimpleType string
    isFilterable string
    variation_attributes object
    isSearchable string
    group string
    type stringrequired
    label objectrequired
    en-us stringrequired
    isIndexable string
    validation string
    isFilterable string
    isSimpleType string
    value string
    comment objectrequired
    en-us stringrequired
    dictionaryIsStatic string
    isUnique string
    collection string
    variation_of object
    isSimpleType string
    isFilterable string
    type stringrequired
    group string
    validation string
    label objectrequired
    en-us stringrequired
    isIndexable string
    isSearchable string
    collection string
    dictionaryIsStatic string
    isUnique string
    value string
    comment objectrequired
    en-us stringrequired
    sku object
    isFilterable string
    collection string
    isSearchable string
    comment objectrequired
    en-us stringrequired
    group string
    type stringrequired
    label objectrequired
    en-us stringrequired
    isIndexable string
    isUnique string
    validation string
    rod_diameter object
    collection string
    isFilterable string
    type stringrequired
    isIndexable string
    isUnique string
    isSimpleType string
    group string
    label objectrequired
    en-us stringrequired
    dictionary object
    visible integer[]
    sortingMethod string
    columns string[]
    validation undefined[]
    sorting undefined[]
    unique integer[]
    data string[]
    validation string
    value string
    isSearchable string
    comment objectrequired
    en-us stringrequired
    dictionaryIsStatic string
    price object
    value string
    label objectrequired
    en-us stringrequired
    comment objectrequired
    en-us stringrequired
    collection string
    group string
    isFilterable string
    isSimpleType string
    validation string
    isIndexable string
    isUnique string
    type stringrequired
    isSearchable string
    dictionaryIsStatic string
    title object
    isFilterable string
    group string
    collection string
    label objectrequired
    en-us stringrequired
    comment objectrequired
    en-us stringrequired
    isIndexable string
    isUnique string
    validation string
    isSearchable string
    type stringrequired
    categories object
    type stringrequired
    collection string
    label objectrequired
    en-us stringrequired
    isUnique string
    isFilterable string
    isSearchable string
    isIndexable string
    validation string
    group string
    comment objectrequired
    en-us stringrequired
    thumbnail object
    comment objectrequired
    en-us stringrequired
    group string
    collection string
    type stringrequired
    isSearchable string
    isFilterable string
    isIndexable string
    validation string
    label objectrequired
    en-us stringrequired
    isUnique string
    status stringrequired

    The status of the API request. A value of "OK" indicates that the request was successfully sent and processed.

    sku_count integerrequired

    The number of products found

Loading...