Skip to main content
New to the API? Start with Quickstart API. This page is a detailed reference for production-grade integrations.

Base URL

Use the stage/cell-specific base URL for your tenant.

Step 1 — Create a submission

POST /v2/submission Creates a new submission record and returns:
  • a unique submission_id
  • a presigned upload_url for uploading the file bytes

Request headers

Authorization: Bearer <access_token>
Content-Type: application/json

Request body (optional)

{
  "query_id": "your-internal-document-id",
  "pipeline_configuration": "FRAUD_ONLY",
  "enable_decision": false,
  "enable_submission_characteristics": false
}
FieldTypeDefaultNotes
query_idstring (0–1024)nullOptional correlation ID. Must not contain PII.
pipeline_configurationenumFRAUD_ONLYSelects which pipeline runs for this submission.
enable_decisionbooleanfalseEnables Adaptive Decision (if available for your tenant).
enable_submission_characteristicsbooleanfalseIf true, characteristics must be submitted before analysis proceeds.

Pipeline configuration values

ValueDescription
FRAUD_ONLYRun fraud analysis (default)
CLASSIFICATION_ONLYRun document classification only
QUALITY_ONLYRun quality analysis only
This enum selects a single pipeline. If you need multiple outputs, retrieve them from the corresponding endpoint(s) or use an agreed configuration provided during provisioning.

Response — 200 OK

{
  "submission_id": "sub_abc123xyz",
  "upload_url": "https://bucket.s3.amazonaws.com/...",
  "submission_characteristics_upload_url": "/v2/submission/sub_abc123xyz/characteristics"
}
FieldDescription
submission_idUnique identifier for this submission. Store it — used in all subsequent calls.
upload_urlPresigned URL for uploading the document bytes (Step 2).
submission_characteristics_upload_urlPresent only when submission characteristics are enabled.

Step 2 — Upload the document bytes

Upload the original file bytes to the presigned upload_url using HTTP PUT.

Upload request

UPLOAD_URL="<upload_url_from_step_1>"
FILE_PATH="/path/to/your/document.pdf"

curl --request PUT \
  --url "$UPLOAD_URL" \
  --header "content-type: application/octet-stream" \
  --data-binary @"$FILE_PATH"

Upload rules

  • Method must be PUT
  • Content-Type must be application/octet-stream
  • Upload the original bytes (do not base64 encode or re-render)
  • The presigned URL expires — upload promptly after creating the submission
If upload fails, validate your outbound allowlist and proxy rules: see Domains to allowlist.

Step 3 — Submit submission characteristics (optional)

PUT /v2/submission/{submission_id}/characteristics If you created the submission with enable_submission_characteristics: true, you must submit characteristics before analysis proceeds.
Do not enable submission characteristics unless you intend to send them for every submission. When enabled, they are required for that submission.
This page does not document the full schema (it is extensive and evolves). See:

Response — 204 No Content

Characteristics accepted — analysis will proceed.

Step 4 — Fetch analysis results

Results are returned asynchronously. Fetch them by calling the relevant endpoint(s) for your pipeline and feature configuration.

Polling semantics (important)

A 404 can mean “result not ready yet” or “not found” (e.g., wrong stage/cell, wrong submission_id). If 404 persists, verify you’re using the correct base URL for the same stage/cell where the submission was created.
See Polling for results for recommended exponential backoff and timeouts.

Fraud analysis

GET /v2/submission/{submission_id}/fraud Returns fraud indicators and an overall risk score.

Query parameters

ParameterTypeDefaultDescription
with_metadatabooleanfalseIncludes extended indicator metadata (e.g., for UI visualization / localized detections).

Response (example)

{
  "status": "SUCCESS",
  "score": "NORMAL",
  "indicators": [
    {
      "indicator_id": "in_transaction_cluster",
      "type": "RISK",
      "category": "...",
      "title": "...",
      "origin": "fraud"
    }
  ]
}
Fraud score values: NORMAL, TRUSTED, WARNING, HIGH_RISK
Status values: SUCCESS, SKIPPED, INVALID_INPUT, FAILED

Quality analysis

GET /v2/submission/{submission_id}/quality Returns document image/scan quality assessment. Quality score values: HIGH_QUALITY, LOW_QUALITY, NOT_RELEVANT_DOCUMENT

Document classification

GET /v2/submission/{submission_id}/classification Returns the detected document type. Classification score values: CLASSIFIED, NOT_CLASSIFIED, DOCUMENT_MISSING

Adaptive Decision (customisable layer)

GET /v2/submission/{submission_id}/decision Returns a tenant-specific decision. Available only when enable_decision: true and Adaptive Decision is configured for your tenant by Resistant AI team.

Query parameters

ParameterExampleDescription
embedfraudEmbeds the /fraud result (e.g., indicators). For full fraud payload (including metadata), fetch /fraud directly.

Content extraction (limited access)

GET /v2/submission/{submission_id}/content Returns extracted text/structured content. This endpoint applies only to selected document types from Czechia.

Downloadable PDF report

GET /v2/submission/{submission_id}/report Returns a download URL for a human-readable PDF fraud analysis report.

Query parameters

ParameterTypeDescription
include_decisionbooleanInclude Adaptive Decision result in the report.
Returns 409 Conflict if fraud analysis or adaptive decision was not completed successfully or was skipped.

Feedback

PUT /v2/submission/{submission_id}/feedback
Stores analyst feedback for the submission.
GET /v2/submission/{submission_id}/feedback
Retrieves previously stored feedback.
All custom feedback must be reviewed before submission to ensure it does not contain PII.

Delete a submission

DELETE /v2/submission/{submission_id} Permanently deletes the submission and associated data before the configured retention period.
Returns 409 Conflict if the submission is still being processed.

Common HTTP error codes

CodeMeaningRecommended action
400Bad requestValidate request body / parameters
401UnauthorizedVerify token is valid and not expired
403ForbiddenVerify scopes/permissions for the tenant/app
404Not found / not readyRetry with backoff; verify stage/cell + submission_id if persistent
409ConflictRetry later (e.g., delete while processing)
415Unsupported media typeEnsure correct Content-Type
429Too many requestsBack off + retry (exponential backoff + jitter)
For retry and timeout guidance, see Limits & quotas and Polling for results.