> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-api/connect/available-resources/joint-resolution-6/suspected-fraud-query.md).

# Suspected Fraud Query

{% hint style="info" %}
**Authentication Requirements:**

* Regular endpoints use `OAuth2` authentication with base URL: `https://api.us.prd.caf.io`
* For enhanced security, some endpoints may also support `mTLS` authentication with base URL: `https://mtls.us.prd.caf.io`
* For information on implementing `mTLS`, access [Using mTLS](https://docs.caf.io/caf-api/connect/authentication/using-mtls.md)
  {% endhint %}

The suspected fraud query retrieves the suspected frauds by a conditional search.

{% openapi src="/files/J8iqm5NWDI0JBS28CSBQ" path="/query" method="post" %}
[fraud.yaml](https://3218940882-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVxCOSyBojfSIE5fcpfH%2Fuploads%2Fgit-blob-d3ab2969dfa76d80af01feb928533625973ac66d%2Ffraud.yaml?alt=media)
{% endopenapi %}

{% hint style="warning" %}
**Deprecated properties:** `queryMode`, `startDate` and `endDate` are still accepted to keep the request payload compatible, but they no longer have any effect on the query.
{% endhint %}

## Options

As demonstrated in the example request you can set the above properties to the search/query the suspected frauds:

* The `identifier` object is used to query suspected fraud occurrences, is composed by `data` (a string representing the document number) and by `type` (must be `CPF` or `CNPJ`). It's a **required** property;
* The `queryMode` property is **deprecated**. It's still accepted in the payload, but has no effect on the query;
* The `startDate` and `endDate` properties are **deprecated**. They're still accepted in the payload, but have no effect on the query;
* The `page` property should only be used for queries with paginated responses due to the excessive size of the data. It is an optional integer field. If not specified, a standard query is executed; if specified, it retrieves the requested page.

{% hint style="info" %}
The occurrences returned by the query no longer include the suspected fraud `token`. To retrieve the tokens of the suspected frauds created by your organization, use the [Suspected Fraud List](https://docs.caf.io/caf-api/connect/available-resources/joint-resolution-6/suspected-fraud-list.md).
{% endhint %}

## Concurrent Equivalent Requests

While a query for the same `identifier` from your organization is still being processed, an equivalent request receives `425 Too Early`. Retry after the interval indicated by the `Retry-After` header.

## Paginated Responses

Paginated responses are used to handle the large volume of aggregated data returned. Each page contains up to **5,000 entries** and is ordered by occurrence date, with the most recent entries appearing first.

Pages are valid for **1 hour**. After this period, any attempt to access these pages will result in a `410 Gone` error. Similarly, attempting to retrieve pages for non-paginated queries will also result in an error.

Pagination uses 0-based indexing — ensure this is followed when requesting subsequent pages.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.caf.io/caf-api/connect/available-resources/joint-resolution-6/suspected-fraud-query.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
