> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/products/group-product-items.md).

# Group Product Items

Administrative endpoints for **group product items** — the membership rows that link a **Grouped** product (the `from_product`, sold as a set) to each **Simple** product it contains (the `to_product`), together with the quantity of that member included in the set.

### Core Capabilities

**1. Group Item Listing & Filtering**

* Retrieve a paginated list of group product items.
* Filter by the grouped master product (`from_product`) and by the member product (`to_product`).

**2. Group Item Lifecycle Management**

* Add a member to a grouped product, retrieve, update (PUT/PATCH), or remove one.
* Whenever an item is created or updated, the grouped master product's price is recomputed from its members' prices (see the dynamic setting below).

### Membership Rules

| Rule        | Description                                                                                                             |
| ----------- | ----------------------------------------------------------------------------------------------------------------------- |
| Master type | `from_product` must be a **Grouped** product. Otherwise the request is rejected with `group_product_item_100_1`.        |
| Member type | `to_product` must be a **Simple** product. Otherwise the request is rejected with `group_product_item_100_2`.           |
| Uniqueness  | A given `(from_product, to_product)` pair may exist only once. A duplicate is rejected with the "already exists" error. |

### Dynamic Settings & Environment Variables

The behavior of the create and update operations is influenced by the following dynamic setting, configured in the management panel.

| Key                              | Type                                                                | Default                                                                       | Effect                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| -------------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GROUPED_PRODUCT_PRICE_SELECTOR` | string (one of three dotted import paths, chosen from a fixed list) | `omnishop.catalogs.selector.group_product_min_price_selector` (Minimum Price) | Selects the strategy used to derive a grouped product's price from its members' prices. It is applied on **create** (`POST /group_product_items/`) and **update** (`PUT`/`PATCH /group_product_items/{id}/`), when the grouped master product's price is recomputed after its membership changes. Allowed values are `...group_product_min_price_selector` (lowest member price), `...group_product_max_price_selector` (highest member price), and `...group_product_sum_price_selector` (sum of member prices). |

**Environment variables:** No environment variables affect these endpoints.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/products/group-product-items.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
