> ## 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.

# destinationEntries

> Lists the card entries one endpoint of a destination's API version serves, shaped as that endpoint exposes them, with filtering, sorting and forward paging. Select `totalCount` only when you need it. Fails with `NOT_FOUND` for an unknown destination version or endpoint and with `BAD_USER_INPUT` for an invalid argument.



**query** `destinationEntries(after: String, destinationId: String!, endpoint: String!, first: Int, language: String, sort: [SortInput!], version: Int!, where: Predicate): DestinationEntriesConnection`

## Arguments

**`after`**: `String`

Returns the elements in the list that come after the specified cursor.

---

**`destinationId`**: `String!` (required)

Raw id of the destination (`Destination.safeName`, e.g. `products`), not the global `Destination.id`. Case-insensitive.

---

**`endpoint`**: `String!` (required)

Name of the endpoint in the version's API URL (`Endpoint.safeName`), not the global `Endpoint.id`. Case-insensitive.

---

**`first`**: `Int`

Returns the first _n_ elements from the list.

---

**`language`**: `String`

Output language code (e.g. `en`) of the content, also used by localized properties in `where` and `sort`. One of the languages the API version publishes; null uses the version's default language.

---

**`sort`**: `[SortInput!]`

Sort keys, applied in order: a card property the endpoint exposes (by id or alias), `id` or `@updatedAt`. At most 16 keys, each once (case-insensitive), with `id` only as the last key. Null or empty sorts by entry id ascending, and entry id ascending breaks ties. Missing values sort last.

---

**`version`**: `Int!` (required)

Number of the destination's API version (`ApiVersion.version`), from 1. Versions that were never published are included; versions being deleted aren't.

---

**`where`**: `Predicate`

Filters the endpoint's entries, as a `Predicate` over the card properties and relations the endpoint exposes, named by id or by their alias in the endpoint, plus `id` (the entry id, as text) and `@updatedAt` (when the entry last changed, as a timestamp). `segment` takes only segments the endpoint's segment filters include or exclude, and `lifecycle` is rejected. Null returns every entry the endpoint serves.

## Returns

`DestinationEntriesConnection`

**`edges`**: `[DestinationEntriesEdge!]`

A list of edges.

---

**`nodes`**: `[DestinationEntry]`

A flattened list of the nodes.

---

**`pageInfo`**: `PageInfo!`

Information to aid in pagination.

---

**`totalCount`**: `Long!`

## Examples

```graphql Query
query DestinationEntries($destinationId: String!, $endpoint: String!, $version: Int!) {
  destinationEntries(destinationId: $destinationId, endpoint: $endpoint, version: $version) {
    edges {
      cursor
      node {
        content
        entryId
        meta {
          __typename
        }
      }
    }
    nodes {
      content
      entryId
      meta {
        language
        segments {
          __typename
        }
        segmentTags
        type
        updatedAt
      }
    }
    pageInfo {
      endCursor
      hasNextPage
      hasPreviousPage
      startCursor
    }
    totalCount
  }
}
```

```json Variables
{
  "destinationId": "string",
  "endpoint": "string",
  "version": 1
}
```

```json Response
{
  "data": {
    "destinationEntries": {
      "edges": [
        {
          "cursor": "string",
          "node": {
            "content": "value",
            "entryId": "string",
            "meta": {
              "__typename": "DestinationEntryMeta"
            }
          }
        }
      ],
      "nodes": [
        {
          "content": "value",
          "entryId": "string",
          "meta": {
            "language": "string",
            "segments": {
              "__typename": "SegmentsConnection"
            },
            "segmentTags": [
              "string"
            ],
            "type": "string",
            "updatedAt": "value"
          }
        }
      ],
      "pageInfo": {
        "endCursor": "string",
        "hasNextPage": true,
        "hasPreviousPage": true,
        "startCursor": "string"
      },
      "totalCount": "value"
    }
  }
}
```


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