> For the complete documentation index, see [llms.txt](https://developer.flash-payments.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.flash-payments.com/compliance/request-for-information/query-rfis.md).

# Query RFIs

### **Retrieving a single RFI**

Use the `rfi` query with the `id` from the `rfi_created` webhook to load the questions and the linked transactions. The query returns `null` if the RFI does not exist or does not belong to you.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    id: "61f3a2c8d1e9b7a4c5d6e7f8",
  },
  query: `
query ($id: ID!) {
  rfi(id: $id) {
    id
    status
    statusMessage
    deadline
    questions {
      questionCode
      questionText
      fileUploadOption
      answered
    }
    withdrawals { id status }
    deposits { id status }
    payments { id status }
    createdAt
  }
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
query($id: ID!) {
  rfi(id: $id) {
    id
    status
    statusMessage
    deadline
    questions {
      questionCode
      questionText
      fileUploadOption
      answered
    }
    withdrawals { id status }
    deposits { id status }
    payments { id status }
    createdAt
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```javascript
{
  "id": "61f3a2c8d1e9b7a4c5d6e7f8"
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "data": {
    "rfi": {
      "id": "61f3a2c8d1e9b7a4c5d6e7f8",
      "status": "PENDING",
      "statusMessage": "We are waiting for your replies",
      "deadline": "2026-06-04T09:00:00.000Z",
      "questions": [
        {
          "questionCode": "SENDER_ID_PROOF",
          "questionText": "Sender's ID proof",
          "fileUploadOption": "PREFERRED",
          "answered": false
        },
        {
          "questionCode": "OTHER_TX_PURPOSE",
          "questionText": "Purpose of transfer",
          "fileUploadOption": "NONE",
          "answered": false
        }
      ],
      "withdrawals": [
        { "id": "61f3a2c8d1e9b7a4c5d6e7aa", "status": "REVIEWING" }
      ],
      "deposits": [],
      "payments": [],
      "createdAt": "2026-05-28T09:00:00.000Z"
    }
  }
}
```

{% endtab %}
{% endtabs %}

### **The key RFI fields**

| Field                                   | Description                                                                                                       |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `status`                                | One of `PENDING`, `ASSESSING`, `CLOSED` — see [RFI statuses](/compliance/request-for-information/rfi-statuses.md) |
| `statusMessage`                         | Human-readable explanation of the current status                                                                  |
| `deadline`                              | Submission deadline. Respond before it passes                                                                     |
| `questions`                             | The questions to answer. `answered` tells you which ones are still open                                           |
| `deposits` / `withdrawals` / `payments` | The transactions this RFI is gating, in the same shape as the `deposit`, `withdrawal`, and `payment` queries      |

Each question's `fileUploadOption` tells you what kind of answer it expects — see [Answer RFI questions.](/compliance/request-for-information/answer-rfi-questions.md)

### **Retrieving all RFIs**

Use the `rfis` query, for example to find everything still awaiting your response.

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    input: {
      statuses: ["PENDING"],
    },
  },
  query: `
query ($input: RfisInput) {
  rfis(input: $input) {
    id
    status
    deadline
    questions {
      questionCode
      answered
    }
    createdAt
  }
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
query($input: RfisInput) {
  rfis(input: $input) {
    id
    status
    deadline
    questions {
      questionCode
      answered
    }
    createdAt
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```javascript
{
  "input": {
    "statuses": ["PENDING"]
  }
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
  "data": {
    "rfis": [
      {
        "id": "61f3a2c8d1e9b7a4c5d6e7f8",
        "status": "PENDING",
        "deadline": "2026-06-04T09:00:00.000Z",
        "questions": [
          { "questionCode": "SENDER_ID_PROOF", "answered": false },
          { "questionCode": "OTHER_TX_PURPOSE", "answered": false }
        ],
        "createdAt": "2026-05-28T09:00:00.000Z"
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}

### **Filter fields on** `RfisInput`

| Field          | Description                                                                               |
| -------------- | ----------------------------------------------------------------------------------------- |
| `statuses`     | Filter by one or more [RFI statuses](/compliance/request-for-information/rfi-statuses.md) |
| `minCreatedAt` | Return only RFIs created at or after this timestamp (ISO 8601, inclusive)                 |
| `maxCreatedAt` | Return only RFIs created at or before this timestamp (ISO 8601, inclusive)                |

All filters are optional and combined with an "AND" logic when more than one is supplied. With no `input`, all your RFIs will be returned.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.flash-payments.com/compliance/request-for-information/query-rfis.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
