> ## Documentation Index
> Fetch the complete documentation index at: https://developer.clopos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Product by ID

> Retrieve a single product with type-specific details.

## Purpose

Returns a single product from the Clopos catalog, along with related data specific to its type (variants, modifiers, recipe, timer settings, etc.). Use the `with` parameters to fetch only the sub-resources you need.

## HTTP Request

```http theme={null}
GET https://integrations.clopos.com/open-api/v2/products/{id}
```

<Warning>
  This endpoint requires authentication. Include your JWT in the `x-token` header. See [Authentication](/authentication) for how to obtain a token and [Errors](/errors) for error responses.
</Warning>

## Path Parameters

<ParamField path="id" type="string" required>
  The product ID (integer or UUID).
</ParamField>

## Query Parameters

<ParamField query="with[]" type="string">
  Related data selector. Example: `taxes`, `unit`, `modifications`, `modificator_groups`, `recipe`, `packages`, `media`, `tags`, `setting`. You can include multiple `with` parameters.
</ParamField>

> Supported `with` values may vary based on your backend version.

## Request Example

<CodeGroup>
  ```bash cURL (GOODS with Variants) theme={null}
  curl -X GET "https://integrations.clopos.com/open-api/v2/products/419?with[]=modifications&with[]=taxes" \
    -H "x-token: oauth_example_token" \
  ```

  ```bash cURL (DISH with Modifiers) theme={null}
  curl -X GET "https://integrations.clopos.com/open-api/v2/products/1?with[]=modificator_groups&with[]=recipe" \
    -H "x-token: oauth_example_token" \
  ```

  ```javascript javascript (All Relations) theme={null}
  const params = new URLSearchParams([
    ['with[]', 'taxes'],
    ['with[]', 'unit'],
    ['with[]', 'modificator_groups.modificators.ingredient.unit'],
    ['with[]', 'recipe'],
    ['with[]', 'packages']
  ]);

  const response = await fetch(`https://integrations.clopos.com/open-api/v2/products/1?${params}`, {
    headers: {
      'x-token': 'oauth_example_token',
    }
  });

  const product = await response.json();
  ```
</CodeGroup>

## Response

### 200 OK — Product found

```json theme={null}
{
  "success": true,
  "data": {
    "id": 1,
    "parent_id": null,
    "station_id": null,
    "category_id": null,
    "unit_id": 1,
    "type": "INGREDIENT",
    "name": "Test_Tomato",
    "parent_name": "",
    "full_name": "Test_Tomato",
    "position": null,
    "barcode": null,
    "gov_code": null,
    "status": 1,
    "hidden": 0,
    "sold_by_weight": false,
    "discountable": true,
    "giftable": false,
    "has_modifications": false,
    "description": null,
    "price": 0,
    "cost_price": 0,
    "cooking_time": 0,
    "inventory_behavior": 0,
    "low_stock": 0,
    "unit_weight": 0,
    "venues": [],
    "media": [],
    "created_at": "2026-01-13 20:04:05",
    "updated_at": "2026-01-13 20:04:05"
  }
}
```

### 404 Not Found — Product does not exist

```json theme={null}
{
  "success": false,
  "error": "resource_not_found",
  "message": "Product not found"
}
```

## Field Reference

[See the full breakdown of the `Product` object and nested structures such as `modifications` and `modificator_groups` on the List Products page.](/api-reference/v2/products/get-all-products#field-reference)

### Product Object

| Field                | Type               | Description                                                                                                                                                                                                                                                                                                                             |
| -------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                 | integer            | Unique product identifier.                                                                                                                                                                                                                                                                                                              |
| `parent_id`          | integer (nullable) | ID of the parent product for a variant. A row with `type: "MODIFICATION"` is a **variant** of the `GOODS` product referenced here — "modification" and "variant" mean the same thing in this API, and a variant carries the full product schema (same fields as the parent, with its own `price`, `cost_price`, stock, barcodes, etc.). |
| `station_id`         | integer (nullable) | ID of the preparation station assigned to this product.                                                                                                                                                                                                                                                                                 |
| `category_id`        | integer (nullable) | ID of the category this product belongs to.                                                                                                                                                                                                                                                                                             |
| `unit_id`            | integer            | ID of the unit of measurement.                                                                                                                                                                                                                                                                                                          |
| `type`               | string             | Product type: `GOODS`, `DISH`, `TIMER`, `PREPARATION`, `INGREDIENT`, `MODIFICATION`, `MODIFIER`.                                                                                                                                                                                                                                        |
| `name`               | string             | Product name.                                                                                                                                                                                                                                                                                                                           |
| `parent_name`        | string             | Name of the parent product (empty string if none).                                                                                                                                                                                                                                                                                      |
| `full_name`          | string             | Full product name including variant info (e.g., "Fanta 0.5 L").                                                                                                                                                                                                                                                                         |
| `position`           | integer (nullable) | Display order position within the category.                                                                                                                                                                                                                                                                                             |
| `barcode`            | string (nullable)  | **Deprecated.** Legacy single-barcode field, kept for backwards compatibility and not guaranteed to be populated. For current barcodes, request `with[]=codes` and read from the `codes` array.                                                                                                                                         |
| `gov_code`           | string (nullable)  | Government/tax code for the product.                                                                                                                                                                                                                                                                                                    |
| `status`             | integer            | `1` = active, `0` = inactive.                                                                                                                                                                                                                                                                                                           |
| `hidden`             | integer            | `1` = hidden from menus, `0` = visible.                                                                                                                                                                                                                                                                                                 |
| `sold_by_weight`     | boolean            | Whether the product is sold by weight rather than quantity.                                                                                                                                                                                                                                                                             |
| `discountable`       | boolean            | Whether discounts can be applied to this product.                                                                                                                                                                                                                                                                                       |
| `giftable`           | boolean            | Whether this product can be given as a gift/complimentary item.                                                                                                                                                                                                                                                                         |
| `has_modifications`  | boolean            | If `true`, the product has variants in the `modifications` array.                                                                                                                                                                                                                                                                       |
| `description`        | string (nullable)  | Product description text.                                                                                                                                                                                                                                                                                                               |
| `price`              | number             | Base selling price. For parent GOODS with variants, this may be `0` since variants carry their own prices.                                                                                                                                                                                                                              |
| `cost_price`         | number             | Cost price used for margin calculations.                                                                                                                                                                                                                                                                                                |
| `cooking_time`       | integer            | Estimated preparation time in minutes.                                                                                                                                                                                                                                                                                                  |
| `inventory_behavior` | integer            | Inventory tracking mode. `0` = `MINUS_INGREDIENTS` — on sale, deduct the recipe's ingredients from stock (typical for `DISH`). `1` = `MINUS_SELF` — deduct the product itself from stock (countable `GOODS` / `INGREDIENT`). `3` = `PASSIVE` — no inventory tracking (uncountable).                                                     |
| `low_stock`          | integer            | Low stock threshold for alerts.                                                                                                                                                                                                                                                                                                         |
| `unit_weight`        | number             | Physical weight of a single unit, in **kilograms**. For example, if `unit_id` resolves to `pcs`, this is how much one piece weighs (a single packet that weighs 3 kg is stored as `3`). Independent of `sold_by_weight`; used for logistics, shipping, and stock-by-weight calculations, not for pricing mode.                          |
| `venues`             | array              | Venue-specific availability and pricing overrides.                                                                                                                                                                                                                                                                                      |
| `media`              | array              | Image attachments. See [Media object](/common-objects#media).                                                                                                                                                                                                                                                                           |
| `created_at`         | string             | Creation timestamp.                                                                                                                                                                                                                                                                                                                     |
| `updated_at`         | string             | Last update timestamp.                                                                                                                                                                                                                                                                                                                  |

## Notes

* If the `id` parameter is in the wrong format, the backend returns a `400` error; validate it on the client side.
* Since `with` parameters are evaluated sequentially, avoid using the same key more than once.
* Type-specific heavy relationships (for example, large `recipe` or `modificator_groups`) can produce large responses; request only what you need.
* Some fields may be empty or null depending on the product type; use the `type` field to drive conditional rendering on the client.
* For TIMER products, the `setting.prices` array represents additional fees applied after a certain duration.
* For INGREDIENT products, the `packages` field shows the package sizes used in stock entries; if not applicable, it is an empty array.
