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:
| Field | Data Type | Validation | Required |
|---|---|---|---|
| Invoice Number | String | Alphanumeric, max 50 chars | Yes |
| Invoice Date | Date | ISO 8601 format | Yes |
| Seller Name | String | Max 100 chars | Yes |
| Seller Address | String | Complete address | Yes |
| Buyer Name | String | Max 100 chars | Yes |
| Buyer Address | String | Complete address | Yes |
| Line Items | Array | Min 1 item, max 100 items | Yes |
| Item Description | String | Max 200 chars per item | Yes |
| Quantity | Number | Positive decimal | Yes |
| Unit Price | Number | Positive decimal, 2 decimals | Yes |
| Total Amount | Currency | Positive decimal, valid currency code | Yes |
| Currency Code | String | ISO 4217 code (USD, EUR, etc.) | Yes |
| Invoice Terms | Enum | Incoterms (FOB, CIF, CPT, etc.) | No |
| Payment Terms | String | Net 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:
| Field | Data Type | Validation | Required |
|---|---|---|---|
| Packing List Number | String | Alphanumeric, max 50 chars | Yes |
| Shipment Date | Date | ISO 8601 format | Yes |
| Origin Country | String | ISO 3166-1 code | Yes |
| Destination Country | String | ISO 3166-1 code | Yes |
| Consignee Name | String | Max 100 chars | Yes |
| Total Packages | Integer | Positive integer | Yes |
| Total Weight (kg) | Number | Positive decimal | Yes |
| Total Volume (m³) | Number | Positive decimal | No |
| Line Items | Array | Min 1 item, max 100 items | Yes |
| Item SKU | String | Max 50 chars | No |
| Item Quantity | Number | Positive decimal | Yes |
| Package Weight | Number | Positive 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:
| Field | Data Type | Validation | Required |
|---|---|---|---|
| B/L Number | String | Alphanumeric, max 50 chars | Yes |
| Shipping Line | String | Max 100 chars | Yes |
| Port of Loading | String | Port code (UNLOCODE) | Yes |
| Port of Discharge | String | Port code (UNLOCODE) | Yes |
| Shipper Name | String | Max 100 chars | Yes |
| Consignee Name | String | Max 100 chars | Yes |
| Notify Party | String | Max 100 chars | No |
| Container Numbers | Array | Max 50 containers | No |
| Container Type | String | 20ft, 40ft, 40HC, etc. | No |
| Marks and Numbers | String | Max 500 chars | No |
| Total Packages | Integer | Positive integer | Yes |
| Total Weight (kg) | Number | Positive decimal | Yes |
| Freight Terms | Enum | Prepaid, Collect | No |
| Signature Date | Date | ISO 8601 format | No |
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:
| Field | Data Type | Validation | Required |
|---|---|---|---|
| Certificate Number | String | Alphanumeric, max 50 chars | Yes |
| Issuing Country | String | ISO 3166-1 code | Yes |
| Issue Date | Date | ISO 8601 format | Yes |
| Exporter Name | String | Max 100 chars | Yes |
| Exporter Address | String | Complete address | Yes |
| Importer Name | String | Max 100 chars | Yes |
| Country of Origin | String | ISO 3166-1 code | Yes |
| Destination Country | String | ISO 3166-1 code | Yes |
| Line Items | Array | Min 1 item, max 100 items | Yes |
| Product Description | String | Max 200 chars | Yes |
| HS Code | String | 6-10 digit HS code | Yes |
| Product Quantity | Number | Positive decimal | Yes |
| Product Value | Currency | Positive decimal, 2 decimals | Yes |
| Certificate Authority Signature | String | Presence indicator | Yes |
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.