---
title: entities.productCategory
description: Read product category records with the productCategory repository, and change them with the product category mutations. Same records as the REST ProductCategories entity.
canonical: https://developers.coevera.com/reference/graphql/product-category/
section: graphql
verification: schema
generatedFrom: schema f155746 (2026-10-20)
publisher: Coevera
---

# entities.productCategory

Read product category records with the productCategory repository, and change them with the product category mutations. Same records as the REST ProductCategories entity.

REST: [ProductCategories](https://developers.coevera.com/reference/rest/product-categories.md).

## Queries

- `getById(entityId: ID!): ProductCategoryEntity` Returns the record with the given id, or null when there is none. Deleted records are returned as well.
- `getByIds(entityIds: [ID!]!): [ProductCategoryEntity!]!` Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well.
- `getAll(limit: Int, offset: Int, filter: ProductCategoryFilterInput, orderBy: [ProductCategoryOrderByInput!], includeDeleted: Boolean): [ProductCategoryEntity!]!` Returns the records that match the filter, paged with limit and offset.
- `getByCriteria(filter: ProductCategoryFilterInput, orderBy: [ProductCategoryOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int): ProductCategoryEntityConnection` Returns the records that match the filter as a cursor-paginated connection.
- `getChangedFieldsSinceRevision(id: UUID!, revision: Int!): [UUID!]!` Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking.

## Mutations

- `createProductCategory(input: CreateProductCategoryInput!, validationLevel: [ValidationLevel!]): CreateProductCategoryPayload` Create one record.
- `updateProductCategory(input: UpdateProductCategoryInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String): UpdateProductCategoryPayload` Update fields.
- `bulkUpdateProductCategory(input: [CreateOrUpdateProductCategoryInput!]!, deleteInput: [DeleteProductCategoryInput!], validationLevel: [ValidationLevel!], rollbackMethod: RollbackMethod, match: MatchingInput): BulkUpdateProductCategoryPayload` Create or update many; per-item results.
- `deleteProductCategory(input: DeleteProductCategoryInput!): DeleteProductCategoryPayload` Soft-delete.

## Types

### ProductCategoryEntity (object)

Category in the hierarchy of the product catalog.

- `isDeleteProtected: Boolean!` True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only.
- `id: ID!` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `parent: ProductCategoryEntity` Parent category in the catalog hierarchy. Empty for top-level categories.
- `name: String!` Name of the entity and its default text representation.
- `parentId: ID` Id of the parent category.
- `revision: Int` Revision when entity was lastly changed.
- `productRelations: ProductEntityConnection (7 args)` All Products in this category.
- `instancePermissions: [EntityPermsEnum!]! (1 args)` Permissions the current user has on this record, out of the requested ones.

### ProductCategoryEntityConnection (object)

Paginated list of ProductCategory records.

- `pageInfo: PageInfo!` Pagination data for this connection.
- `edges: [ProductCategoryEntityEdge]!` Contains the nodes in this connection.
- `totalCount: Int` Total number of items in the connection.

### ProductCategoryEntityEdge (object)

A Relay edge containing a `ProductCategoryEntity` and its cursor.

- `node: ProductCategoryEntity` The item at the end of the edge
- `cursor: String!` A cursor for use in pagination

### ProductCategoryFilterInput (input)

Filter conditions for ProductCategory records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.

- `OR: [ProductCategoryFilterInput!]` Matches records that meet at least one of the listed filters.
- `AND: [ProductCategoryFilterInput!]` Matches records that meet all of the listed filters.
- `NOT: ProductCategoryFilterInput` Matches records that do not meet this filter.
- `globalSearchQuery: String` Search term matched against the fields that the global search covers for this entity.
- `id: EntityFilterStringField` Unique identifier of entity.
- `isDeleted: Boolean` Specifies if the entity is considered deleted.
- `modified: EntityFilterDateTimeField` Last modification time.
- `created: EntityFilterDateTimeField` Creation time.
- `name: EntityFilterStringField` Name of the entity and its default text representation.
- `parentId: EntityFilterStringField` Id of the parent category.
- `revision: EntityFilterNumberField` Revision when entity was lastly changed.
- `parent: ProductCategoryFilterInput` Parent category in the catalog hierarchy. Empty for top-level categories. Matches records where a related record meets these conditions.
- `productRelations: ProductFilterInput` All Products in this category. Matches records where a related record meets these conditions.

### ProductCategoryOrderByInput (input)

Sorting of ProductCategory records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.

- `id: OrderByEnum` Unique identifier of entity.
- `isDeleted: OrderByEnum` Specifies if the entity is considered deleted.
- `modified: OrderByEnum` Last modification time.
- `created: OrderByEnum` Creation time.
- `parent: [ProductCategoryOrderByNestedInput!]` Parent category in the catalog hierarchy. Empty for top-level categories. Sorts by fields of the related record, listed in order of priority.
- `name: OrderByEnum` Name of the entity and its default text representation.
- `parentId: OrderByEnum` Id of the parent category.
- `revision: OrderByEnum` Revision when entity was lastly changed.

### CreateOrUpdateProductCategoryInput (input)

Field values of a ProductCategory record to create, or to update when its id is set.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `name: String` Name of the entity and its default text representation.
- `parentId: ID` Id of the parent category.
- `revision: Int` Revision when entity was lastly changed.
- `productRelations: [CreateProductNoProductCategoryBackrefInput!]` All Products in this category.

### CreateProductCategoryInput (input)

Field values of a new ProductCategory record.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `name: String!` Name of the entity and its default text representation.
- `parentId: ID` Id of the parent category.
- `revision: Int` Revision when entity was lastly changed.
- `productRelations: [CreateProductNoProductCategoryBackrefInput!]` All Products in this category.

### CreateProductNoProductCategoryBackrefInput (input)

Field values of a new Product record, created together with the record it belongs to.

- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `picture: CreateCloudObjectInput` Product picture.
- `allowedPipelines: AccessPipelinesEnum` Whether this product can be added to all pipelines or only the explicitly linked subset (see productPipelineRelations).
- `currencyExchangeRatesListId: ID` Id of the currency exchange rate list applied to this product.
- `description: String` Free-form description of the product.
- `name: String!` Name of the product, shown in catalogues and pickers.
- `pictureId: ID` Id of the product picture document.
- `productTypeId: ID` Id of the product type that classifies this product.
- `sku: String` Stock-keeping unit (SKU) identifier of the product. Must be unique across products.
- `unitSymbol: String` Unit of measure shown next to product quantities (e.g. pcs, kg, hours).
- `customFields: JSONString` Custom field values to set, as a JSON object keyed by custom field API name, e.g. {"cfBudget": 1000}. Only the custom fields included are changed; each value uses the format of that field.
- `revision: Int` Revision when entity was lastly changed.
- `productPipelineRelations: [CreateProductPipelineRelationNoProductBackrefInput!]` Deprecated pipeline connection.
- `productPipelines: ProductPipelinesInput` Configuration of Pipelines where the Product can be used.
- `pictureSourceUrl: String` URL of an image to use as the product picture. The image is downloaded from this URL and checked; only pictures are supported.

### DeleteProductCategoryInput (input)

Id of the ProductCategory record to delete.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID!` Unique identifier of entity.

### UpdateProductCategoryInput (input)

Id of a ProductCategory record and the field values to change.

- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).
- `id: ID!` Unique identifier of entity.
- `modified: DateTime` Last modification time.
- `created: DateTime` Creation time.
- `name: String` Name of the entity and its default text representation.
- `parentId: ID` Id of the parent category.
- `revision: Int` Revision when entity was lastly changed.
- `productRelations: [CreateProductNoProductCategoryBackrefInput!]` All Products in this category.

### BulkUpdateProductCategoryPayload (object)

Result of the bulkUpdateProductCategory mutation.

- `result: BulkUpdateResults!` Ids of the created, updated and deleted records, and the items that failed.

### CreateProductCategoryPayload (object)

Result of the createProductCategory mutation.

- `productCategory: ProductCategoryEntity` The created record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### DeleteProductCategoryPayload (object)

Result of the deleteProductCategory mutation.

- `productCategory: ProductCategoryEntity` The deleted record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

### UpdateProductCategoryPayload (object)

Result of the updateProductCategory mutation.

- `productCategory: ProductCategoryEntity` The updated record.
- `clientMutationId: String` Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention).

Types several repositories share, such as `PageInfo` and the filter fields, are in the [types index](https://developers.coevera.com/reference/graphql/types.md). The [SDL](https://developers.coevera.com/graphql/schema.graphql) has the whole schema in one file.

## Example

```graphql
query FirstProductCategorys {
  entities {
    productCategory {
      getByCriteria(first: 3, orderBy: [{ modified: Desc }]) {
        totalCount
        edges { node { id name modified } }
      }
    }
  }
}
```

```bash
curl 'https://{region}.api.coevera.com/api/v100/app/space/{space_id}/graphql/public' \
  --user "$COEVERA_API_KEY:$COEVERA_API_SECRET" \
  --header 'Content-Type: application/json' \
  --data '{"query":"query FirstProductCategorys { entities { productCategory { getByCriteria(first: 3, orderBy: [{ modified: Desc }]) { totalCount edges { node { id name modified } } } } } }"}'
```
