---
title: "Get products"
method: GET
path: "/products"
tags: ["products"]
---

# Get products

`GET /products`

Gets a list of products with optional filtering and pagination.

## Query parameters

- `page` integer
- `per_page` integer
- `search` string
- `category` string
- `tag` string
- `type` 'simple' | 'grouped' | 'external' | 'variable'
- `featured` boolean
- `on_sale` boolean
- `min_price` string
- `max_price` string
- `stock_status` 'instock' | 'outofstock' | 'onbackorder'
- `orderby` 'date' | 'id' | 'include' | 'title' | 'slug' | 'price' | 'popularity' | 'rating' | 'menu_order' | 'alphabetical' | 'reverse_alpha' | 'relevance' | 'rand' | 'by_stock' | 'review_count' | 'on_sale_first' | 'featured_first' | 'price_asc' | 'price_desc' | 'sales'
- `order` 'ASC' | 'DESC'
- `slug` string
- `after` string, date-time
- `before` string, date-time
- `sku` string
- `hide_free` boolean
- `category_operator` 'in' | 'not_in' | 'and'
- `tag_operator` 'in' | 'not_in' | 'and'
- `brand` string
- `brand_operator` 'in' | 'not_in' | 'and'
- `show_reviews` boolean
- `return_variations` boolean
- `attribute_relation` 'in' | 'and'
- `catalog_visibility` 'any' | 'visible' | 'catalog' | 'search' | 'hidden'
- `rating` integer[]
- `offset` integer
- `include` integer[]
- `exclude` integer[]
- `parent` integer[]
- `parent_exclude` integer[]

## Response `200`

Products retrieved successfully.

- ProductsResponse — CoCart v2 Products collection response with pagination
  - `products` Product[] — Array of products
    - `id` integer — Unique identifier for the product
    - `parent_id` integer — Product parent ID
    - `name` string — Product name
    - `type` 'simple' | 'grouped' | 'external' | 'variable' — Product type
    - `slug` string — Product slug
    - `permalink` string — Product URL
    - `sku` string — Unique identifier (SKU)
    - `description` string — Product description
    - `short_description` string — Product short description
    - `dates` object — Product dates
      - `created` string, date-time — Date created in local time
      - `created_gmt` string, date-time — Date created in GMT
      - `modified` string, date-time — Date modified in local time
      - `modified_gmt` string, date-time — Date modified in GMT
    - `featured` boolean — Whether the product is featured
    - `prices` object — Product pricing information
      - `price` string — Current product price
      - `regular_price` string — Product regular price
      - `sale_price` string — Product sale price (empty string if not on sale)
      - `price_range` object, nullable — Price range for variable products (null for non-variable products)
      - `on_sale` boolean — Whether the product is on sale
      - `date_on_sale` object — Sale date information
        - `from` string, date-time, nullable — Sale start date in local time
        - `from_gmt` string, date-time, nullable — Sale start date in GMT
        - `to` string, date-time, nullable — Sale end date in local time
        - `to_gmt` string, date-time, nullable — Sale end date in GMT
      - `currency` Currency
        - `currency_code` string — Currency code.
        - `currency_symbol` string — Currency symbol.
        - `currency_symbol_pos` string — Currency symbol position.
        - `currency_minor_unit` integer — Currency minor unit.
        - `currency_decimal_separator` string — Currency decimal separator.
        - `currency_thousand_separator` string — Currency thousand separator.
        - `currency_prefix` string — Currency prefix.
        - `currency_suffix` string — Currency suffix.
    - `hidden_conditions` object — Product conditional flags
      - `virtual` boolean — Whether the product is virtual
      - `downloadable` boolean — Whether the product is downloadable
      - `manage_stock` boolean — Whether stock is managed at product level
      - `sold_individually` boolean — Whether only one item can be bought in a single order
      - `reviews_allowed` boolean — Whether reviews are allowed
      - `shipping_required` boolean — Whether the product needs to be shipped
    - `average_rating` string — Average rating
    - `review_count` integer — Number of reviews
    - `rating_count` integer — Number of ratings
    - `rated_out_of` string — Maximum rating value (formatted)
    - `images` ProductImage[] — Product images
      - `id` integer — Image ID
      - `src` object — Image URLs in different sizes
      - `name` string — Image name
      - `alt` string — Image alternative text
      - `position` integer — Image position in gallery
      - `featured` boolean — Whether this is the featured image
    - `categories` ProductCategory[] — Product categories
      - `id` integer — Category ID
      - `name` string — Category name
      - `slug` string — Category slug
      - `rest_url` string — REST URL for this category
    - `tags` ProductTag[] — Product tags
      - `id` integer — Tag ID
      - `name` string — Tag name
      - `slug` string — Tag slug
      - `rest_url` string — REST URL for this tag
    - `attributes` ProductAttribute[] — Product attributes
      - `id` integer — Attribute ID.
      - `name` string — Attribute name.
      - `position` integer — Attribute position.
      - `visible` boolean — Define if the attribute is visible on the "Additional information" tab in the product's page.
      - `variation` boolean — Define if the attribute can be used as variation.
      - `options` string[] — List of available term names of the attribute.
    - `default_attributes` ProductDefaultAttribute[] — Default variation attributes
      - `id` integer — Attribute ID.
      - `name` string — Attribute name.
      - `option` string — Selected attribute term name.
    - `variations` ProductVariation[] — Full variation objects (not just IDs)
      - `id` integer — Unique identifier for the variation
      - `parent_id` integer — Product parent ID (the variable product this variation belongs to)
      - `name` string — Variation name
      - `slug` string — Variation slug
      - `permalink` string — Variation URL
      - `sku` string — Unique identifier (SKU)
      - `description` string — Variation description
      - `dates` object — Variation dates
        - `created` string, date-time — Date created in local time
        - `created_gmt` string, date-time — Date created in GMT
        - `modified` string, date-time — Date modified in local time
        - `modified_gmt` string, date-time — Date modified in GMT
      - `featured` boolean — Whether the variation is featured
      - `prices` object — Variation pricing information
        - `price` string — Current variation price
        - `regular_price` string — Variation regular price
        - `sale_price` string — Variation sale price (empty string if not on sale)
        - `price_range` object, nullable — Price range (null for variations)
        - `on_sale` boolean — Whether the variation is on sale
        - `date_on_sale` object — Sale date information
          - `from` string, date-time, nullable — Sale start date in local time
          - `from_gmt` string, date-time, nullable — Sale start date in GMT
          - `to` string, date-time, nullable — Sale end date in local time
          - `to_gmt` string, date-time, nullable — Sale end date in GMT
        - `currency` Currency
          - `currency_code` string — Currency code.
          - `currency_symbol` string — Currency symbol.
          - `currency_symbol_pos` string — Currency symbol position.
          - `currency_minor_unit` integer — Currency minor unit.
          - `currency_decimal_separator` string — Currency decimal separator.
          - `currency_thousand_separator` string — Currency thousand separator.
          - `currency_prefix` string — Currency prefix.
          - `currency_suffix` string — Currency suffix.
      - `hidden_conditions` object — Variation conditional flags (note reviews_allowed is not present)
        - `virtual` boolean — Whether the variation is virtual
        - `downloadable` boolean — Whether the variation is downloadable
        - `manage_stock` boolean — Whether stock is managed at variation level
        - `sold_individually` boolean — Whether only one item can be bought in a single order
        - `shipping_required` boolean — Whether the variation needs to be shipped
      - `images` ProductImage[] — Variation images
        - `id` integer — Image ID
        - `src` object — Image URLs in different sizes
        - `name` string — Image name
        - `alt` string — Image alternative text
        - `position` integer — Image position in gallery
        - `featured` boolean — Whether this is the featured image
      - `categories` ProductCategory[] — Product categories (inherited from parent)
        - `id` integer — Category ID
        - `name` string — Category name
        - `slug` string — Category slug
        - `rest_url` string — REST URL for this category
      - `tags` ProductTag[] — Product tags (inherited from parent)
        - `id` integer — Tag ID
        - `name` string — Tag name
        - `slug` string — Tag slug
        - `rest_url` string — REST URL for this tag
      - `attributes` ProductAttribute[] — Variation attributes
        - `id` integer — Attribute ID.
        - `name` string — Attribute name.
        - `position` integer — Attribute position.
        - `visible` boolean — Define if the attribute is visible on the "Additional information" tab in the product's page.
        - `variation` boolean — Define if the attribute can be used as variation.
        - `options` string[] — List of available term names of the attribute.
      - `stock` object — Stock information
        - `is_in_stock` boolean — Whether the variation is in stock
        - `stock_quantity` integer, nullable — Stock quantity (null if not managing stock)
        - `stock_status` 'instock' | 'outofstock' | 'onbackorder' — Stock status
        - `backorders` 'no' | 'notify' | 'yes' — If managing stock, this controls if backorders are allowed
        - `backorders_allowed` boolean — Whether backorders are allowed
        - `backordered` boolean — Whether the variation is on backorder
        - `low_stock_amount` integer, nullable — Low stock threshold amount
      - `weight` object — Variation weight
        - `value` string, nullable — Weight value
        - `unit` string — Weight unit (kg, g, lbs, oz, etc.)
      - `dimensions` object — Variation dimensions
        - `length` string, nullable — Length value
        - `width` string, nullable — Width value
        - `height` string, nullable — Height value
        - `unit` string — Dimension unit (cm, m, in, etc.)
      - `total_sales` integer — Total number of sales for this variation
      - `add_to_cart` object — Add to cart information (note has_options is not present)
        - `text` string — Add to cart button text
        - `description` string — Add to cart description
        - `is_purchasable` boolean — Whether the variation is purchasable
        - `purchase_quantity` object — Purchase quantity limits
          - `min_purchase` integer — Minimum purchase quantity
          - `max_purchase` integer — Maximum purchase quantity allowed
        - `rest_url` string — REST URL for adding this variation to cart
      - `meta_data` object[] — Meta data
        - `key` string
        - `value` string
    - `grouped_products` integer[] — Grouped product IDs
    - `stock` object — Stock information
      - `is_in_stock` boolean — Whether the product is in stock
      - `stock_quantity` integer, nullable — Stock quantity (null if not managing stock)
      - `stock_status` 'instock' | 'outofstock' | 'onbackorder' — Stock status
      - `backorders` 'no' | 'notify' | 'yes' — If managing stock, this controls if backorders are allowed
      - `backorders_allowed` boolean — Whether backorders are allowed
      - `backordered` boolean — Whether the product is on backorder
      - `low_stock_amount` integer, nullable — Low stock threshold amount
    - `weight` object — Product weight
      - `value` string, nullable — Weight value
      - `unit` string — Weight unit (kg, g, lbs, oz, etc.)
    - `dimensions` object — Product dimensions
      - `length` string, nullable — Length value
      - `width` string, nullable — Width value
      - `height` string, nullable — Height value
      - `unit` string — Dimension unit (cm, m, in, etc.)
    - `reviews` ProductReview[] — Product reviews (populated when show_reviews parameter is true)
      - `id` integer — Unique identifier for the resource.
      - `date_created` string, date-time — The date the review was created.
      - `date_created_gmt` string, date-time — The date the review was created, as GMT.
      - `product_id` integer — Unique identifier for the product that the review belongs to.
      - `status` string — Status of the review.
      - `reviewer` string — Name of the reviewer.
      - `reviewer_email` string — Email of the reviewer.
      - `review` string — The content of the review.
      - `rating` integer — Review rating (0 to 5).
      - `verified` boolean — Shows if the reviewer bought the product or not.
    - `related` ConnectedProduct[] — Related products with basic information
      - `id` integer — Product ID
      - `name` string — Product name
      - `permalink` string — Product URL
      - `price` string — Product price
      - `add_to_cart` object — Add to cart information
        - `text` string — Add to cart button text
        - `description` string — Add to cart description
        - `rest_url` string — REST URL for adding this product to cart
      - `rest_url` string — REST URL for this product
    - `upsells` ConnectedProduct[] — Upsell products with basic information
      - `id` integer — Product ID
      - `name` string — Product name
      - `permalink` string — Product URL
      - `price` string — Product price
      - `add_to_cart` object — Add to cart information
        - `text` string — Add to cart button text
        - `description` string — Add to cart description
        - `rest_url` string — REST URL for adding this product to cart
      - `rest_url` string — REST URL for this product
    - `cross_sells` ConnectedProduct[] — Cross-sell products with basic information
      - `id` integer — Product ID
      - `name` string — Product name
      - `permalink` string — Product URL
      - `price` string — Product price
      - `add_to_cart` object — Add to cart information
        - `text` string — Add to cart button text
        - `description` string — Add to cart description
        - `rest_url` string — REST URL for adding this product to cart
      - `rest_url` string — REST URL for this product
    - `total_sales` integer — Total number of sales
    - `external_url` string — External product URL (for external product type)
    - `button_text` string — External product button text (for external product type)
    - `add_to_cart` object — Add to cart information (CoCart-specific)
      - `text` string — Add to cart button text
      - `description` string — Add to cart description
      - `has_options` boolean — Whether the product has options
      - `is_purchasable` boolean — Whether the product is purchasable
      - `purchase_quantity` object — Purchase quantity limits
        - `min_purchase` integer — Minimum purchase quantity
        - `max_purchase` integer — Maximum purchase quantity allowed
      - `rest_url` string — REST URL for adding this product to cart
    - `meta_data` object[] — Meta data
      - `key` string
      - `value` string
  - `page` integer — Current page number
  - `total_pages` integer — Total number of pages
  - `total_products` integer — Total number of products

## Other responses

- `400` — Bad request - invalid parameters.

---

[API](https://skmtc.net/cocartapi/apis/cocart-jwt-authentication.md) · [All operations](https://skmtc.net/cocartapi/apis/cocart-jwt-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cocartapi/cocart-jwt-authentication/revisions/2031b047ca5f/schema)
