Export Formats
The ways to take data out of CargoLint: JSON through the API, a CSV or Excel table of fields and lines, corrected PDFs, audit packets, original files and the personal data export.
Available export formats
| Format | What it holds | How to get it |
|---|---|---|
| JSON | Extracted fields, check results, shipment findings and checklist | The API |
| CSV or Excel | The corrected fields and line items as one table, a row per line | GET /documents/{id}/export?format=csv, GET /shipments/{id}/export?format=xlsx |
| A clean document built from the corrected fields | GET /review/{documentId}/export-pdf |
|
| ZIP audit packet | Everything behind a document’s or shipment’s result | POST /documents/{id}/audit-packet, POST /shipments/{id}/audit-packet |
| Original files | The files as uploaded, one by one or per batch | GET /documents/{id}/download, GET /documents/batch/{batchId}/download |
| Personal data export | Your account’s personal data, as JSON | POST /gdpr/export |
For the same exports in the app, see Exporting Data.
Extraction results (JSON)
curl "https://api.cargolint.com/api/v1/documents/{document_id}/extractions" \
-H "X-API-Key: cl_YOUR_API_KEY"
{
"documentId": "6b0f7c1e-2d1a-4a8e-9f0e-1c2b3d4e5f60",
"detectedDocumentType": "Invoice",
"qualityScore": 100,
"qualityLevel": "none",
"fields": [
{ "fieldName": "InvoiceId", "value": "INV-2026-001", "confidence": 0.95, "boundingBox": null },
{ "fieldName": "InvoiceDate", "value": "2026-10-01", "confidence": 0.95, "boundingBox": null },
{ "fieldName": "InvoiceTotal", "value": "5250.00", "confidence": 0.95, "boundingBox": null },
{ "fieldName": "CurrencyCode", "value": "USD", "confidence": 0.95, "boundingBox": null }
],
"lineItems": [ ... ]
}
Fields are a flat list of name, value and confidence, the AI’s rating of how clearly it read the value (0 to 1). Line fields are indexed (Items[0].Description). Values are strings as read, with reviewer corrections applied. Each kind’s field names, labels and groups are in fieldDisplay from GET /config. See Get extraction results.
Other JSON you can read:
- The document’s check results:
GET /documents/{id}/compliance - The shipment’s findings, route, coverage and expected-documents checklist:
GET /shipments/{id}
Corrected PDF
curl "https://api.cargolint.com/api/v1/review/{document_id}/export-pdf" \
-H "X-API-Key: cl_YOUR_API_KEY" \
-o invoice_corrected.pdf
A clean PDF of the document built from its fields with corrections applied, for every kind CargoLint reads. It carries a version stamp (extraction version, engine version, generation time and a checksum) and, if your organization set them in Settings, your logo and footnote. A kind CargoLint does not read returns 400.
Audit packet (ZIP)
curl -X POST "https://api.cargolint.com/api/v1/documents/{document_id}/audit-packet" \
-H "X-API-Key: cl_YOUR_API_KEY" \
-o audit-packet.zip
| File | Contents |
|---|---|
document.json |
The document’s metadata, with its source (Email for a document that arrived by email), its Quality score and that score’s level |
exported.pdf |
The corrected PDF, for kinds CargoLint reads |
extraction.json |
The fields with corrections applied |
corrections.json |
Every reviewer correction, with its original value and conflict state |
compliance.json |
The latest check results |
shipment-consistency.json |
The latest shipment evaluation, when the document is in a shipment |
version-stamp.json |
The values printed on the PDF |
POST /shipments/{id}/audit-packet returns shipment.json, shipment-consistency.json and one folder per document under documents/.
Table export (CSV or Excel)
GET /documents/{id}/export?format=xlsx
GET /shipments/{id}/export?format=csv
One table, for a document or for every current document of a shipment: a row per line item, or one row for a document without lines. The first columns are Shipment, Document, Document kind and File name; then the header fields of every kind in the export; then Line; then the line fields. Values are the corrected ones the PDF export prints, with computed fields left out. Column labels and order follow fieldDisplay from GET /config, so the sheet reads like the review page. In the Excel file, amounts and quantities are numbers and codes stay text; the CSV is UTF-8 with a byte order mark. A document superseded by a newer upload is left out of a shipment export. The response names the file after the document or shipment reference. Available on every plan.
Original files
# One document
curl "https://api.cargolint.com/api/v1/documents/{document_id}/download" \
-H "X-API-Key: cl_YOUR_API_KEY" -o original.pdf
# The Completed documents of an upload batch
curl "https://api.cargolint.com/api/v1/documents/batch/{batch_id}/download" \
-H "X-API-Key: cl_YOUR_API_KEY" -o batch_documents.zip
Personal data export (JSON)
A user can export their personal data. This works with a user session, not an API key:
# Request the export
curl -X POST https://api.cargolint.com/api/v1/gdpr/export \
-H "Authorization: Bearer YOUR_JWT"
# Check its status
curl https://api.cargolint.com/api/v1/gdpr/export/{export_id} \
-H "Authorization: Bearer YOUR_JWT"
# Download it once completed, within 24 hours
curl https://api.cargolint.com/api/v1/gdpr/export/{export_id}/download \
-H "Authorization: Bearer YOUR_JWT" -o my-data.json
What it contains is described in GDPR Compliance. It is not a way to export documents in bulk; use the API or the audit packets for that.
ERP or TMS integration
A connection sends the data itself: it fills the job in a system CargoLint connects to directly as documents are approved, or renders your system’s import layout as a file when the shipment is settled. Without one, if your system imports a spreadsheet, the table export is the shortest route: download it per shipment and map its columns once. For a live feed of your own:
- Subscribe to
document.completedorshipment.evaluatedwebhooks. - On each event, read the fields or the shipment through the API.
- Map CargoLint’s field names to your system’s, using
fieldDisplayfromGET /configfor labels. - Post the result to your system.
Data transformation tips
- Quality - import only approved (
Completed) documents, or usequalityLeveland the problems fromGET /documents/{id}/issuesto decide what to import without a check; a field’sconfidencesays how clearly it was read, not whether the document is complete. - Types - values are strings; convert dates and amounts to your system’s formats.
- Kinds - branch on
detectedDocumentType, the kind id, not ondocumentType, which is the file’s media type. - Findings - carry the check results with the data when your users need to see why a document was flagged.
- Errors - log failed imports with the document id for a manual follow-up.