CIFFA 2026 - VaughanSee the offer

API Reference

Document Kinds and Statuses
CargoLint REST API.

Every document kind id CargoLint returns, the tiers and families they belong to, and every document status, including the ones for recognized-only kinds and packs.

Document Kinds and Statuses

Responses and webhooks name a document’s kind by its registry id, in detectedDocumentType, and its state by a status string, in status. This page lists both. The registry itself is served by GET /config under documentKinds, with a version; read it from there rather than hard-coding the list.

documentType on a document is the file’s media type (application/pdf, image/png, image/jpeg or image/tiff), not its kind.

Tiers

Each kind sits in one tier, which says how far CargoLint goes with it:

Tier What CargoLint does
Validated Reads the fields and checks them: the document’s own checks, the destination’s requirements, and the checks across the shipment
Extracted Reads the fields without checking them. Every kind CargoLint reads today is Validated
Recognized Identifies the document and keeps it, titled and counted as present in its shipment. Nothing is read, so it has no fields, no review and no findings. It is never refused as unsupported

A Recognized document ends with status Recognized, and its check result is a pass with a coverage statement whose reason is kind_not_read: the check did not run, and the coverage says so.

Document kinds

Kind id Label Family Tier Kept per shipment
Invoice Invoice commercial Validated one
PackingList Packing List commercial Validated one
BillOfLading Bill of Lading transport (sea) Validated one per number
CertificateOfOrigin Certificate of Origin origin Validated one
AirWaybill Air Waybill transport (air) Validated one per number
RoadConsignmentNote Road Consignment Note transport (road) Validated one
RailConsignmentNote Rail Consignment Note transport (rail) Validated one
InsuranceCertificate Insurance Certificate commercial Validated one
DangerousGoodsDeclaration Dangerous Goods Declaration regulatedGoods Validated many
PhytosanitaryCertificate Phytosanitary Certificate regulatedGoods Validated many
HealthCertificate Health Certificate regulatedGoods Validated many
CargoManifest Cargo Manifest transport Recognized many
FreightInvoice Freight Invoice commercial Recognized many
PurchaseOrder Purchase Order commercial Recognized many
LetterOfCredit Letter of Credit commercial Recognized one
WeightCertificate Weight Certificate commercial Recognized many
ContainerPackingCertificate Container Packing Certificate regulatedGoods Recognized many
FumigationCertificate Fumigation Certificate regulatedGoods Recognized many
CatchCertificate Catch Certificate regulatedGoods Recognized many
CitesPermit CITES Permit regulatedGoods Recognized many
ImportPermit Import Permit regulatedGoods Recognized many
ExportLicense Export License regulatedGoods Recognized many
DeclarationOfConformity Declaration of Conformity regulatedGoods Recognized many
ConformityCertificate Conformity Certificate regulatedGoods Recognized many
PackingDeclaration Packing Declaration regulatedGoods Recognized one
LaceyActDeclaration Lacey Act Declaration regulatedGoods Recognized one
CustomsDeclaration Customs Declaration customs Recognized many
ExportDeclaration Export Declaration customs Recognized many
InTransitManifest In-Transit Manifest customs Recognized many
TransitDocument Transit Document customs Recognized many
FilingConfirmation Filing Confirmation customs Recognized many
Unknown Unknown - Recognized many

RoadConsignmentNote covers the CMR road consignment note. Unknown is a document CargoLint could not name; it is kept like any other Recognized document.

Families

transport, commercial, origin, regulatedGoods and customs. An expected-documents row can ask for a family rather than a kind; any kind of that family satisfies it. A transport kind also has a mode (sea, air, road or rail), which is how CargoLint reads a shipment’s transport mode.

Kept per shipment

The registry’s multiplicity says how many active documents of a kind a shipment keeps:

  • one - a newer document of the kind replaces the older one for checks.
  • onePerNumber - one per document number. A corrected copy with the same number replaces the old one; different numbers stay active, so a master bill and its house bill are both kept. The house bill drives the shipment checks, and the master is compared with it.
  • many - every document of the kind is kept.

A replaced document stays attached to its shipment with supersededByDocumentId and supersededAt set.

Other registry fields

  • multilingual - the kind is a form pre-printed in several languages, so it is read even when its labels are not in English. Other kinds must be in English.

Which kinds and forms carry HS codes, and which fields each must carry, are in the document requirements.

Document statuses

Status Meaning
Uploaded Stored and waiting to be queued for processing
Processing Being scanned, classified and read
WaitingForAiService Parked by a temporary outage of the AI service; retried automatically. waitingSinceUtc says since when
PendingApproval Read with nothing held for a reviewer and at most one warning (a Quality score of 100% or 90%); waiting for someone to approve it
RequiresReview Needs a person: problems that add up to one that needs fixing, or two warnings, from any source (a Quality score below 90%), an HS code to confirm, a poor scan, a blocking finding on the document, or a finding across its shipment. holdReason on the document list and on the issues names which: problems, reading, hs, ocr, blocking or shipment
Completed Approved by a reviewer
Skipped Deferred by a reviewer. An email attachment of no recognized kind is also marked Skipped
Recognized Identified as a kind CargoLint recognizes but does not read. Kept and counted as present in its shipment, with no fields; it is never reviewed or approved
Split The upload held several documents and was split into them. The upload is a container that lists its parts in splitDocuments and leaves the shipment; each part is its own document with splitFromDocumentId set. Final
Failed Could not be processed: unreadable content, a language other than English, a file flagged by the malware scan, or another permanent error

A document’s status moves from PendingApproval to RequiresReview when its document checks finish and its counted problems add up to one that needs fixing, or two warnings. It can move back from PendingApproval or Completed to RequiresReview when a check across its shipment finds an Error, or from PendingApproval when it finds a Warning. A document a person already approved stays Completed on a Warning. Statuses are never raised automatically.

For what each status means in the app, see Document Statuses.

Where these values appear

  • detectedDocumentType and status on GET /documents, GET /documents/{id} and the shipment detail.
  • documentKind and documentFamily on checklist rows.
  • status, and the kind id in documentType, in webhook payloads, including document.recognized and document.split. In webhook payloads documentType is the kind, not the media type.