# product query


`product` is a GraphQL query of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Returns one product, by its MAX `id` or by its `code`. Use it to read one product that you
know.

- Pass exactly one of `id` or `code`. Otherwise the error is `VALIDATION`.
- `code` must match exactly.
- Returns null when the organisation has no such product.
- Archived products are returned.
- Requires the `item.read` permission.

## Arguments

- `id`: [`UUID`](/chameleoon-max/type/uuid)
- `code`: `String`

## Returns

[`Product`](/chameleoon-max/type/product)

## Example

**Query**

```graphql
query product($id: UUID) {
  product(id: $id) {
    id
    code
    name
    baseUnit
    vatRateCode
    setMode
    archivedAt
    updatedAt
    variants(first: 10) {
      totalCount
    }
    externalRefs(first: 10) {
      totalCount
    }
  }
}
```

**Variables**

```json
{
  "id": "00000000-0000-4000-8000-000000000001"
}
```

**Response**

```json
{
  "data": {
    "product": {
      "id": "00000000-0000-4000-8000-000000000001",
      "code": "example",
      "name": "example",
      "baseUnit": "example",
      "vatRateCode": "example",
      "setMode": "ASSEMBLED",
      "archivedAt": "2026-01-01T00:00:00Z",
      "updatedAt": "2026-01-01T00:00:00Z",
      "variants": {
        "totalCount": 1
      },
      "externalRefs": {
        "totalCount": 1
      }
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
