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

# CardDefinition

> Shapes the entries of one or more sources into cards: picks source properties as card properties and sets the data type each exposes. Segments, relations and endpoints are built on card definitions.



**Kind**: `object`

## Implements

- `Node`

## Fields

**`activationStatus`**: `WorkflowStatus!`

Progress of the indexing that makes the card definition's latest property changes live. Its status is `UNKNOWN`, with no steps, for a `DRAFT` card definition or when there's no progress to show.

---

**`activePropertySet`**: `PropertySet`

> Deprecated: use `properties` with property set filter instead

---

**`allowsEnrichment`**: `Boolean!`

True if at least one live card property has `isEditable` set, so enrichment can change the card definition's cards. Read-only.

---

**`cardsCount`**: `Long`

Total number of cards of the card definition. Null when the count can't be read.

---

**`createdAt`**: `DateTime!`

When the card definition was created (UTC).

---

**`createdByUser`**: `UUID!`

Id of the user who created the card definition.

---

**`dataSources`**: `DataSourcesConnection`

Sources the card definition's card properties read from, pending changes included.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `where`: `CardDefinitionDataSourceFilterInput`

---

**`description`**: `String`

Free-text note about the card definition.

---

**`descriptionProperty`**: `String`

Id of the card property (not the source property) whose value describes each card. Null when not set.

---

**`displayOptions`**: `[KeyValuePairOfStringAndString!]`

Card properties that present each card, as `{key, value}` items: `key` is the role (`name`, `description` or `image`), `value` is a card property id.

---

**`endpoints`**: `EndpointsConnection`

Endpoints whose content includes the card definition, as the root or through a relation, in their live or pending content.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `where`: `CardDefinitionEndpointFilterInput`

---

**`etag`**: `Etag`

Version tag for optimistic concurrency. Pass back the value you last read when you change the item.

---

**`id`**: `ID!`

Global id of the card definition: base64 of `CardDefinition:<raw id>`. `cardDefinitionById` and the card definition id arguments of the update, activate, delete and restore mutations take it. The raw id (e.g. `products`) is what `createCardDefinition`, `CardDefinitionProperty.cardDefinitionId`, the lifecycle queries and `cardEntries(definitionId:)` use.

---

**`imageProperty`**: `String`

Id of the card property (not the source property) whose value is each card's image. Null when not set.

---

**`isDeleted`**: `Boolean!`

True if the card definition is archived. Archived card definitions are still returned unless you filter on `isDeleted`. `restoreCardDefinition` restores it.

---

**`lastModified`**: `DateTime!`

When the card definition last changed (UTC).

---

**`lastModifiedByUser`**: `UUID!`

Id of the user who last changed the card definition.

---

**`name`**: `String!`

Name of the card definition, shown in Studio.

---

**`nameProperty`**: `String`

Id of the card property (not the source property) whose value names each card. Null when not set.

---

**`pendingPropertyModifications`**: `[CardPropertyDefinitionModification!]!`

> Deprecated: use `properties` with property set type filter instead

---

**`properties`**: `PropertiesConnection`

Card properties in every state, by `order`: the live ones (`ACTIVE`), the ones being indexed (`UPDATING`) and saved changes not applied yet (`PENDING`). Filter `propertySetType: { eq: ACTIVE }` for what the card exposes now. Paged: select the items under `nodes`.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[CardDefinitionPropertySortInput!]`
- `where`: `CardDefinitionPropertyFilterInput`

---

**`propertyCount`**: `Int`

The number of properties on the card definition, including pending additions.

> Deprecated: use totalCount on `properties` instead

---

**`propertyGroups`**: `[PropertyGroup!]!`

Groups that arrange the card definition's card properties in Studio. A card property can be in one group only.

---

**`relations`**: `RelationsConnection`

Relation definitions that have the card definition as their source or target.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[RelationDefinitionSortInput!]`
- `where`: `RelationDefinitionFilterInput`

---

**`segmentDefinitions`**: `SegmentDefinitionsConnection`

Segment definitions built on the card definition.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[SegmentDefinitionSortInput!]`
- `where`: `SegmentDefinitionFilterInput`

---

**`segments`**: `SegmentsConnection`

Segments built on the card definition, archived ones included.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[SegmentSortInput!]`
- `where`: `SegmentFilterInput`

---

**`sourceRelationDefinitions`**: `SourceRelationDefinitionsConnection`

Relation definitions that have the card definition as their source.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[RelationDefinitionSortInput!]`
- `where`: `RelationDefinitionFilterInput`

---

**`status`**: `CardDefinitionStatus!`

State of the card definition. See `CardDefinitionStatus`.

---

**`tags`**: `[String!]!`

Labels for grouping and filtering card definitions.

---

**`targetRelationDefinitions`**: `TargetRelationDefinitionsConnection`

Relation definitions that have the card definition as their target.

**Arguments:**

- `after`: `String` — Returns the elements in the list that come after the specified cursor.
- `before`: `String` — Returns the elements in the list that come before the specified cursor.
- `first`: `Int` — Returns the first _n_ elements from the list.
- `last`: `Int` — Returns the last _n_ elements from the list.
- `order`: `[RelationDefinitionSortInput!]`
- `where`: `RelationDefinitionFilterInput`

---

**`tenantId`**: `UUID!`

Id of the tenant that owns the item.

---

**`updatingPropertySet`**: `PropertySet`

> Deprecated: use `properties` with property set type `active` filter instead



This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.