# ProductCategory Criterion

The `ProductCategory` Search Criterion searches for products by the category they're assigned to.

## Arguments

- `taxonomyEntries` - array of ints representing category IDs

## Example

### PHP

```
$query = new ProductQuery(
    null,
    new \Ibexa\Contracts\ProductCatalog\Values\Product\Query\Criterion\ProductCategory([2, 3])
);
```

### REST API

**XML**

```
<ProductQuery>
    <Filter>
        <ProductCategoryCriterion>[2, 3]</ProductCategoryCriterion>
    </Filter>
</ProductQuery>
```

**JSON**

```
{
    "ProductQuery": {
        "Filter": {
            "ProductCategoryCriterion": [
                2,
                3
            ]
        }
    }
}
```
