Skip to main content
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.
Document classification identifies what kind of document was submitted — its document_type (e.g. bank_document), a more specific detailed_type (e.g. account_statement), and, where available, the issuer.

Why use classification

  • Know what you received. Confirm a submission matches what your workflow expects (e.g., a bank statement, not a random PDF) without manual triage.
  • Apply the right checks. Classification can drive document-specific fraud checks and Adaptive Decision logic downstream.
  • Catch mismatches early. Run it standalone and act on the result in seconds, before committing to a full fraud analysis.
Classification tells you what a document is — it’s not a fraud or authenticity check. Combine it with fraud analysis to assess whether the document can be trusted.

How it works

Classification returns:
  • document_type — a broad category (e.g. bank_document, id_document, invoice)
  • detailed_type — a subtype within that category (e.g. account_statement, passport)
  • issuer / issuer_parent — the legal entity (and parent, if applicable) that issued the document, when identifiable
issuer, issuer_parent, and variant aren’t populated for every result — it depends on what the classifier can determine for a given document.

Classification score

The top-level score field tells you whether classification succeeded: Check score first — treat document_type and detailed_type as supplementary, not as the primary success signal.

document_type → detailed_type mapping

Every detailed_type belongs to exactly one document_type, except other, which exists separately under every document_type. On its own, other doesn’t tell you which category it belongs to — only the pairing does.
birth_certificate, drivers_license, health_insurance_card, id_card, id_certificate, passport, residence_permit, proof_of_address, other
earnings_confirmation, earnings_statement, earnings_summary, employment_offer_letter, payslip, unemployment_certificate, other
client_assessment, costs_estimate, loan_agreement, loan_application, loan_closure, security_agreement, other
account_confirmation, account_statement, transaction_history, bank_details, fees_statement, payment_confirmation, bank_card, bank_cheque, other
energy, water, utilities, telco, mobile_phone, municipal_services, other
company_detail, employer_identification_number, financial_report, accounting_records, company_share_capital_detail, incorporation_certificate, other
maternity_allowance_claim, property_detail, postal_document, other
invoice, receipt, delivery_note, order_confirmation, tracking_note, transport_order, quote, payment_request, rate_confirmation, load_confirmation, order, other
insurance_claim, insurance_documentation, insurance_claim_settlement, investigation_report, proof_of_insurance, other
tax_form, tax_information, other
vehicle_appraisal, vehicle_registration_certificate, vehicle_technical_certificate, other
medical_report, email, letter, loan_offer, credit_card, ticket, report, paper_date, screenshot, resume, other
document_type: "document_missing" and document_type: "no_classification" aren’t part of the mapping above — they reflect the classification outcome (see Classification score), not a document category. no_classification pairs with detailed_type: "missing"; document_missing has no detailed_type.
See the API Reference for the machine-readable enum.

Two ways to consume classification

Option 1 — Standalone, near real-time

Standalone classification is an add-on and may not be included in your current packaging or contract. Contact your Resistant AI representative to confirm availability and pricing for your tenant.
Create a submission with pipeline_configuration: "CLASSIFICATION_ONLY". Only classification runs, so the result is typically available much faster than a full fraud analysis. Best for: deciding whether to run (and pay for) a full fraud analysis — e.g., rejecting an obviously wrong document type right after upload.
Upload the file bytes as usual (see Core Integration Mechanics), then fetch the result:
Still implement polling with backoff rather than assuming a fixed response time — see Polling for results.

Option 2 — As part of a full analysis

Create the submission normally (default pipeline_configuration: "FRAUD_ONLY"). Classification runs as part of the full pipeline and becomes available on the same timeline as the fraud result — fetch it from the same /classification endpoint once processing completes. Best for: integrations that always run a full fraud analysis and want classification as additional context, without an earlier round trip.
The /classification endpoint is the same either way — what changes is pipeline_configuration at submission time, and how quickly a result becomes available.

Example response

Non-SUCCESS statuses (FAILED, INVALID_INPUT, SKIPPED) follow the same shape as other result endpoints and don’t include document_classification. See Concepts for status meanings.

FAQ

Classification combines several sources — visual pattern matching, logo detection, textual content analysis, and in some configurations LLM-based content understanding. Not every source resolves every field: a document can be confidently matched to a document_type from its visual layout alone, without enough signal to also narrow down a detailed_type or issuer.A populated document_type with a null detailed_type or issuer is expected, not a bug. If a known issuer repeatedly comes back null, contact support with the submission_id — that’s useful signal for improving coverage.
Yes. When detailed_type is populated it always belongs to the returned document_type, but it isn’t guaranteed to be populated whenever document_type is.
Some categories sit close to each other by design: a utility bill is structurally a type of invoice, and a government confirmation letter can look like an identity document in some jurisdictions. Document semantics also vary globally, so the taxonomy trades off a single market’s exact definitions for consistency across customers and regions.If a specific confusion matters for your workflow, let us know — recurring misclassification patterns are useful for prioritizing improvements.
Read it as “confident about the category, not the specific subtype.” If other shows up often for a category you care about, report it — it may mean we’re missing a detailed_type value your documents need.
Resubmitting an identical file shouldn’t routinely produce a different result. If it does, treat that as worth reporting, not expected behavior.
Spotted an inconsistency, or a document type/issuer your workflow needs that doesn’t fit the current taxonomy? Contact support with example submission_ids.

Next steps

Core Integration Mechanics

Full submission → upload → results flow.

Adaptive Decision

Turn classification and fraud results into a tenant-specific decision.

Polling for results

Recommended backoff strategy for both consumption options above.