Document Types & Fields

Understand the four document types CargoLint supports and the fields extracted from each.

Supported Document Types

CargoLint extracts data from four primary international trade documents. Each document type has specific fields with defined data types and validation rules.

Commercial Invoice

Description: Official request for payment from seller to buyer, containing transaction details and invoice terms.

Key Extracted Fields:

FieldData TypeValidationRequired
Invoice NumberStringAlphanumeric, max 50 charsYes
Invoice DateDateISO 8601 formatYes
Seller NameStringMax 100 charsYes
Seller AddressStringComplete addressYes
Buyer NameStringMax 100 charsYes
Buyer AddressStringComplete addressYes
Line ItemsArrayMin 1 item, max 100 itemsYes
Item DescriptionStringMax 200 chars per itemYes
QuantityNumberPositive decimalYes
Unit PriceNumberPositive decimal, 2 decimalsYes
Total AmountCurrencyPositive decimal, valid currency codeYes
Currency CodeStringISO 4217 code (USD, EUR, etc.)Yes
Invoice TermsEnumIncoterms (FOB, CIF, CPT, etc.)No
Payment TermsStringNet 30, Due on Receipt, etc.No

Confidence Thresholds:

  • High confidence: > 0.85
  • Review recommended: 0.65 - 0.85
  • Low confidence: < 0.65 (requires manual review)

Packing List

Description: Itemized list of products and quantities in a shipment, including weight and dimensions.

Key Extracted Fields:

FieldData TypeValidationRequired
Packing List NumberStringAlphanumeric, max 50 charsYes
Shipment DateDateISO 8601 formatYes
Origin CountryStringISO 3166-1 codeYes
Destination CountryStringISO 3166-1 codeYes
Consignee NameStringMax 100 charsYes
Total PackagesIntegerPositive integerYes
Total Weight (kg)NumberPositive decimalYes
Total Volume (m³)NumberPositive decimalNo
Line ItemsArrayMin 1 item, max 100 itemsYes
Item SKUStringMax 50 charsNo
Item QuantityNumberPositive decimalYes
Package WeightNumberPositive decimal (kg)Yes

Confidence Thresholds:

  • High confidence: > 0.80
  • Review recommended: 0.60 - 0.80
  • Low confidence: < 0.60

Bill of Lading (B/L)

Description: Shipping document from carrier to shipper, providing contract of carriage and proof of shipment.

Key Extracted Fields:

FieldData TypeValidationRequired
B/L NumberStringAlphanumeric, max 50 charsYes
Shipping LineStringMax 100 charsYes
Port of LoadingStringPort code (UNLOCODE)Yes
Port of DischargeStringPort code (UNLOCODE)Yes
Shipper NameStringMax 100 charsYes
Consignee NameStringMax 100 charsYes
Notify PartyStringMax 100 charsNo
Container NumbersArrayMax 50 containersNo
Container TypeString20ft, 40ft, 40HC, etc.No
Marks and NumbersStringMax 500 charsNo
Total PackagesIntegerPositive integerYes
Total Weight (kg)NumberPositive decimalYes
Freight TermsEnumPrepaid, CollectNo
Signature DateDateISO 8601 formatNo

Confidence Thresholds:

  • High confidence: > 0.88
  • Review recommended: 0.68 - 0.88
  • Low confidence: < 0.68

Certificate of Origin (CoO)

Description: Document certifying the country of origin of exported goods, often required for trade agreements.

Key Extracted Fields:

FieldData TypeValidationRequired
Certificate NumberStringAlphanumeric, max 50 charsYes
Issuing CountryStringISO 3166-1 codeYes
Issue DateDateISO 8601 formatYes
Exporter NameStringMax 100 charsYes
Exporter AddressStringComplete addressYes
Importer NameStringMax 100 charsYes
Country of OriginStringISO 3166-1 codeYes
Destination CountryStringISO 3166-1 codeYes
Line ItemsArrayMin 1 item, max 100 itemsYes
Product DescriptionStringMax 200 charsYes
HS CodeString6-10 digit HS codeYes
Product QuantityNumberPositive decimalYes
Product ValueCurrencyPositive decimal, 2 decimalsYes
Certificate Authority SignatureStringPresence indicatorYes

Confidence Thresholds:

  • High confidence: > 0.85
  • Review recommended: 0.62 - 0.85
  • Low confidence: < 0.62

Validation Rules Summary

Date Fields: Must be valid dates in ISO 8601 format (YYYY-MM-DD). Future dates in billing period context are accepted; dates beyond 10 years historical are flagged.

Currency Fields: Positive values with exactly 2 decimal places. Valid ISO 4217 currency codes required.

Country Codes: Standard ISO 3166-1 alpha-2 or alpha-3 codes. Invalid codes trigger validation error.

Quantity/Weight Fields: Positive numbers only. Zero quantities flagged as suspicious.

String Fields: Max character limits enforced. Special characters allowed but limited to standard punctuation.