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

# How-to: Listing Interviews For Position

## When to use this

Show recruiters all interviews for a specific position (e.g., everything currently **to evaluate** **or all shortlisted** interviews). This is useful for building position detail pages, queues, or status dashboards in your app.

## GraphQL Request

Make sure to replace the **position(id)** with your ID. The example below fetches interviews in the `to_evaluate` stage. If you want to fetch all interviews for a position, don't include the `stage` filter.

In Hireflix, interviews move through four possible stages:

* `pending` → candidate has not answered yet (pending interview invite)
* `to_evaluate` → candidate has completed the interview, waiting for recruiter review
* `shortlisted` → candidate has been marked as shortlisted (legacy label: finalist)
* `discarded` → candidate has been marked as discarded

<iframe src="https://cdn.hireflix.com/graphql-playground/index.html?query=ListPositionInterviews&url=https://api.hireflix.com/me" width="100%" height="750" />

### Explanation

* **position(id)** – the position whose interviews you want to list (learn how to [fetch positions](/features/positions/fetching-positions)).
* **pagination.limit** – max number of interviews to return in this call.
* **pagination.lastCursor** - a pointer to the next page of results (useful if there are more than limit interviews).

<Note>
  The API always returns a `lastCursor`. When the `results` array comes back empty, it means you’ve reached the end and there are no more records to fetch.
</Note>

* **filter.stage.equal** – filter by a single stage (e.g., `to_evaluate`). Other stages include `discarded`, `to_evaluate`, `pending`, or `shortlisted`.
* **sort.field:createdAt(DESC)** - order results by creation time, newest first.
* **candidate.fullName / email** – basic candidate info for rendering a table or list.

### Other Filter Options

* **filter.email.equal / regex** - Find an exact email match.
* **filter.lastName.equal / regex** - Find an exact or regex match by last name.
* **filter.score.greaterThan / lessThan -** Filter by score (also supports `equal`, `greaterThanOrEqual`, `lessThanOrEqual`, `notEqual`).

### Example Response

```json theme={null}
{
  "data": {
    "position": {
      "name": "Social Media Manager",
      "interviewList": {
        "lastCursor": "eyJ0eXBlIjoiY3Vyc29yIiwiZmllbGRzIjpbeyJuY[...]==",
        "results": [
          {
            "id": "68b4404fc39e5db535d2e005",
            "stage": "to_evaluate",
            "candidate": {
              "fullName": "Greg Morris",
              "email": "gregmorris@gmail.com"
            }
          }
        ]
      }
    }
  }
}
```

### Pagination

Always request the `lastCursor` field, as it lets you fetch results beyond the current page size.

* On your first response, you’ll always get a `lastCursor` token.
* Pass this token into the next request’s `pagination.lastCursor` field to fetch the following page.
* Even if there are no more results, the API will still return a `lastCursor`. To know you’ve reached the end, you must make one more request with the latest `lastCursor`. If that request comes back with an \*\*empty \*\*`results`**array** , there are no more records to fetch.

<iframe src="https://cdn.hireflix.com/graphql-playground/index.html?query=ListPositionInterviewsPaged&url=https://api.hireflix.com/me" width="100%" height="750" />

### Advanced Filtering

The `filter` input supports combining multiple conditions using `AND` and `OR`. This allows you to build more precise searches. For example, you might want to:

* Match candidates by **email**, **first name**, or **last name** (using `OR`).
* At the same time, restrict results to interviews that are still `to_evaluate` (using `AND`).

Here’s what that looks like:

```json theme={null}
filter: { 
  AND: [ 
    {
      OR: [ {
        email: { regex: "Daniel" },
        firstName: { regex: "Daniel" },
        lastName: { regex: "Daniel" }
      }],
    },
    {
      stage: { equal: to_evaluate }
    }
  ]
}
```

This query will return only interviews where the candidate’s email, name, or last name contains "michiel", and the interview is still in the `to_evaluate` stage.

**Rule of thumb:**

* Use `OR` alone for simple "either/or" matching.
* Wrap it in `AND` when you want to combine multiple logical groups.

<Card title="Learn next?" icon="arrow-right" color="#5863ff" horizontal href="/features/interviews/fetching-interview-results">
  Let's learn how to fetch results for an interview.
</Card>
