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

# Integration journeys

> Which endpoints to call depending on your pipeline configuration.

The right endpoints to call after creating a submission depend on which **pipeline** you selected (see [Core Integration Mechanics](https://developers.resistant.ai/integrate/core-integration.md) → Pipeline configuration values). This page walks through the most common journeys.

> [!NOTE]
>
> This guide uses the default EU base URL (`https://api.documents.resistant.ai`).\
> If your tenant is in another cell (e.g., `us-1`, `ca-1`, `ap-2`, `ap-3`), use the corresponding base URL described in [Concepts](https://developers.resistant.ai/getting-started/concepts.md).

***

## Fraud analysis → Adaptive Decision (recommended)

For `pipeline_configuration: "FRAUD_ONLY"` (the default), fraud analysis and Adaptive Decision both run automatically. **`/decision` is the endpoint most integrations should call** — it gives you a single, routable decision output. Fetch `/fraud` only when you need the full indicator-level evidence behind that decision.

```mermaid placement="bottom-right" theme={null}
sequenceDiagram
  autonumber
  actor Client as Customer system
  participant API as Documents API

  Client->>API: POST /v2/submission (pipeline_configuration: FRAUD_ONLY)
  API-->>Client: submission_id + upload_url

  Client->>API: PUT upload_url (file bytes)
  API-->>Client: 200 OK

  Note over API: Fraud analysis runs, then Adaptive Decision

  Client->>API: GET /v2/submission/{submission_id}/decision
  API-->>Client: decision + reason

  opt Need full evidence behind the decision
    Client->>API: GET /v2/submission/{submission_id}/fraud
    API-->>Client: score + indicators
  end
```

* Primary call: `GET /v2/submission/{submission_id}/decision` — see [Adaptive Decision](https://developers.resistant.ai/integrate/adaptive-decision.md).
* Supporting evidence: `GET /v2/submission/{submission_id}/fraud` — the underlying fraud analysis that Adaptive Decision is based on.

***

## Quality-only workflow

For `pipeline_configuration: "QUALITY_ONLY"`, only the document's image/scan quality is assessed. There's no fraud signal to base a decision on, so Adaptive Decision does not apply to this pipeline.

```mermaid placement="bottom-right" theme={null}
sequenceDiagram
  autonumber
  actor Client as Customer system
  participant API as Documents API

  Client->>API: POST /v2/submission (pipeline_configuration: QUALITY_ONLY)
  API-->>Client: submission_id + upload_url

  Client->>API: PUT upload_url (file bytes)
  API-->>Client: 200 OK

  Client->>API: GET /v2/submission/{submission_id}/quality
  API-->>Client: HIGH_QUALITY / LOW_QUALITY / NOT_RELEVANT_DOCUMENT
```

* Fetch: `GET /v2/submission/{submission_id}/quality` — see [Core Integration Mechanics](https://developers.resistant.ai/integrate/core-integration.md) → Quality analysis.

***

## Classification-only workflow

For `pipeline_configuration: "CLASSIFICATION_ONLY"`, only the document type is identified. As with the quality-only workflow, there's no fraud signal involved, so Adaptive Decision does not apply.

```mermaid placement="bottom-right" theme={null}
sequenceDiagram
  autonumber
  actor Client as Customer system
  participant API as Documents API

  Client->>API: POST /v2/submission (pipeline_configuration: CLASSIFICATION_ONLY)
  API-->>Client: submission_id + upload_url

  Client->>API: PUT upload_url (file bytes)
  API-->>Client: 200 OK

  Client->>API: GET /v2/submission/{submission_id}/classification
  API-->>Client: CLASSIFIED / NOT_CLASSIFIED / DOCUMENT_MISSING
```

* Fetch: `GET /v2/submission/{submission_id}/classification` — see [Core Integration Mechanics](https://developers.resistant.ai/integrate/core-integration.md) → Document classification.

***

## Quality gate → optional fraud analysis

For customers who want to reject low-quality submissions (e.g. blurry scans) before committing to a full fraud analysis. This requires **two separate submissions** of the same file — `pipeline_configuration` is fixed per submission, so there's no way to "upgrade" a quality-only submission into a fraud analysis after the fact.

```mermaid placement="bottom-right" theme={null}
sequenceDiagram
  autonumber
  actor Client as Customer system
  participant API as Documents API

  Note over Client,API: Submission 1 — quality pre-check
  Client->>API: POST /v2/submission (pipeline_configuration: QUALITY_ONLY)
  API-->>Client: submission_id_1 + upload_url_1
  Client->>API: PUT upload_url_1 (file bytes)
  API-->>Client: 200 OK
  Client->>API: GET /v2/submission/{submission_id_1}/quality
  API-->>Client: HIGH_QUALITY / LOW_QUALITY / NOT_RELEVANT_DOCUMENT

  alt Quality acceptable
    Note over Client,API: Submission 2 — fraud analysis (same file, re-uploaded)
    Client->>API: POST /v2/submission (pipeline_configuration: FRAUD_ONLY)
    API-->>Client: submission_id_2 + upload_url_2
    Client->>API: PUT upload_url_2 (same file bytes)
    API-->>Client: 200 OK
    Client->>API: GET /v2/submission/{submission_id_2}/decision
    API-->>Client: decision + reason
  else Quality not acceptable
    Note over Client: Reject, or request a better scan — no fraud analysis submitted
  end
```

* Pre-check: `GET /v2/submission/{submission_id_1}/quality` — see [Core Integration Mechanics](https://developers.resistant.ai/integrate/core-integration.md) → Quality analysis.
* If proceeding: create a **new** submission with `pipeline_configuration: FRAUD_ONLY` and re-upload the same file bytes to its new `upload_url`. `submission_id_1` and `submission_id_2` are unrelated — track the link between them yourself (e.g. via your own `query_id`).

***

## Classification gate → optional fraud analysis

Same pattern as the quality gate, but rejecting on document type instead of scan quality — e.g. don't run (and pay for) a fraud analysis on a document type your workflow doesn't expect.

```mermaid placement="bottom-right" theme={null}
sequenceDiagram
  autonumber
  actor Client as Customer system
  participant API as Documents API

  Note over Client,API: Submission 1 — classification pre-check
  Client->>API: POST /v2/submission (pipeline_configuration: CLASSIFICATION_ONLY)
  API-->>Client: submission_id_1 + upload_url_1
  Client->>API: PUT upload_url_1 (file bytes)
  API-->>Client: 200 OK
  Client->>API: GET /v2/submission/{submission_id_1}/classification
  API-->>Client: CLASSIFIED / NOT_CLASSIFIED / DOCUMENT_MISSING

  alt Document type acceptable
    Note over Client,API: Submission 2 — fraud analysis (same file, re-uploaded)
    Client->>API: POST /v2/submission (pipeline_configuration: FRAUD_ONLY)
    API-->>Client: submission_id_2 + upload_url_2
    Client->>API: PUT upload_url_2 (same file bytes)
    API-->>Client: 200 OK
    Client->>API: GET /v2/submission/{submission_id_2}/decision
    API-->>Client: decision + reason
  else Document type not acceptable
    Note over Client: Reject — no fraud analysis submitted
  end
```

* Pre-check: `GET /v2/submission/{submission_id_1}/classification` — see [Document classification](https://developers.resistant.ai/document-classification.md).
* If proceeding: same as the quality gate above — a new `FRAUD_ONLY` submission, same file re-uploaded, unrelated `submission_id`.

> [!NOTE]
>
> Want both a quality **and** a classification pre-check before deciding on fraud? Run both gates independently (two pre-check submissions, two uploads) before the `FRAUD_ONLY` submission — there's no combined pipeline value for "quality + classification only."

***

## Next steps

* [Adaptive Decision](https://developers.resistant.ai/integrate/adaptive-decision.md)
* [Core Integration Mechanics](https://developers.resistant.ai/integrate/core-integration.md)
* [Polling for results](https://developers.resistant.ai/receiving-results/polling.md)


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