POST a bill of lading and get its 24 fields as JSON: parties, ports, vessel, containers and goods, with each container number tested against its ISO 6346 check digit. $0.02 a page, 50 pages free.
Bill of lading OCR API with container number checks
The bill_of_lading preset extracts 24 top-level fields from a document and runs the ISO 6346 check digit formula on every container number. It is one of 7 presets on the same parse call, so the purchase order OCR API and the PDF to JSON API work the same way.
Updated
Example
Ceramic tiles by sea, Rotterdam to Newark
bol-vliestroom.pdf lists 2 containers shipped from Rotterdam, Netherlands to Newark, NJ, USA, and 2 of 2 container numbers pass the ISO 6346 check digit. The run names the values no check covers.
POSTapi.parserkit.com/v1/parse?wait=60
curl "https://api.parserkit.com/v1/parse?wait=60" \
-H "Authorization: Bearer $PARSERKIT_API_KEY" \
-F file=@bol-vliestroom.pdf \
-F preset=bill_of_ladingimport os
import requests
with open("bol-vliestroom.pdf", "rb") as file:
res = requests.post(
"https://api.parserkit.com/v1/parse",
params={"wait": 60},
headers={"Authorization": f"Bearer {os.environ['PARSERKIT_API_KEY']}"},
files={"file": file},
data={"preset": "bill_of_lading"},
)
job = res.json()
print(job["verification"]["status"], job["verification"]["coverage"])import { openAsBlob } from "node:fs";
const form = new FormData();
form.append("file", await openAsBlob("bol-vliestroom.pdf"), "bol-vliestroom.pdf");
form.append("preset", "bill_of_lading");
const res = await fetch("https://api.parserkit.com/v1/parse?wait=60", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PARSERKIT_API_KEY}` },
body: form,
});
const job = await res.json();
console.log(job.verification.status, job.verification.coverage);13 of 45 values went unchecked: the package counts, weights and volumes and the declared value. A bill of lading gets no arithmetic checks, and a number found on the page is not proof on its own.
{
"id": "job_j2966y439settqsl9d48",
"status": "succeeded",
"preset": "bill_of_lading",
"pages": 1,
"cost_usd": 0.02,
"verification_status": "partial",
"data": {
"bol_number": "NBOL-RTM-260417",
"booking_number": "RTM2610-8823",
"issue_date": "2026-10-14",
"shipped_on_board_date": "2026-10-14",
"shipper": {
"name": "Vliestroom Keramiek B.V.",
"address": "Industrieweg 18, 4104 AS Culemborg, Netherlands",
"email": "export@vliestroom.example"
},
"consignee": {
"name": "Palisade Tile & Stone LLC",
"address": "450 Doremus Ave, Newark, NJ 07105, USA"
},
"notify_party": {
"name": "Harborgate Customs Brokerage Inc.",
"address": "1 Brewster Rd, Newark, NJ 07114, USA"
},
"carrier": "Northbridge Ocean Lines",
"vessel": "MV Aldermoor",
"voyage": "026W",
"place_of_receipt": "Culemborg, Netherlands",
"port_of_loading": "Rotterdam, Netherlands",
"port_of_discharge": "Newark, NJ, USA",
"place_of_delivery": "Newark, NJ, USA",
"containers": [
{
"number": "PLGU4286151",
"seal": "NB2264817",
"type": "40ft high cube",
"packages": 11,
"gross_weight": 10840,
"volume": 58.2
},
{
"number": "PLGU4309724",
"seal": "NB2264818",
"type": "40ft high cube",
"packages": 11,
"gross_weight": 10615.5,
"volume": 57.9
}
],
"goods": [
{
"marks": "PTS/NWK/1-22",
"description": "Glazed ceramic wall tiles, 20 by 20 cm",
"hs_code": "6908.90",
"packages": 22,
"package_type": "pallets",
"gross_weight": 21455.5,
"volume": 116.1
}
],
"total_packages": 22,
"total_gross_weight": 21455.5,
"total_volume": 116.1,
"weight_unit": "KGS",
"volume_unit": "CBM",
"freight_terms": "prepaid",
"declared_value": 48600,
"currency": "USD"
},
"verification": {
"status": "partial",
"coverage": {
"values": 45,
"checked": 32
},
"checks": [
{
"kind": "iso6346",
"path": "containers[0].number",
"status": "pass",
"actual": "PLGU4286151",
"message": "a well-formed container number"
},
{
"kind": "iso6346",
"path": "containers[1].number",
"status": "pass",
"actual": "PLGU4309724",
"message": "a well-formed container number"
}
]
},
"outputs": [
{
"name": "output.json",
"bytes": 12251
},
{
"name": "output.xlsx",
"bytes": 10257
},
{
"name": "output.csv",
"bytes": 187
}
],
"warnings": []
}Real response from . Bounding boxes, empty fields and file links left out.
Try it on this fileWhat each part of a bill of lading gets
From the bill_of_lading preset and the checks that run on it.
| Part | Fields | How it counts as checked |
|---|---|---|
| Container numbers | containers[].number | ISO 6346 check digit |
| Parties | shipper, consignee, notify_party | Words on the page or a second read; EU VAT and US EIN formats too |
| Route | carrier, vessel, voyage, place_of_receipt, port_of_loading, port_of_discharge, place_of_delivery | Words on the page or a second read |
| Dates | issue_date, shipped_on_board_date | Words on the page or a second read |
| Goods text | marks, description, hs_code, package_type | Words on the page or a second read |
| Counts and weights | packages, gross_weight, volume, the three totals, declared_value | No sum runs on them, and a printed number alone does not count |
Checks
What gets checked on a bill of lading
Container numbers
Each
containers[].numbermust fit ISO 6346: a 3-letter owner code, U, J or Z, a 6-digit serial and a check digit that matches.Names and places
Parties, the carrier, vessel, voyage and ports count as checked when the words on the page print them or a second read agrees.
Dates
The issue date and the shipped on board date count when the words around them print them or a second read agrees.
VAT and tax IDs
An EU VAT number on a party gets its country format checked, and a US EIN its IRS prefix.
Counts and weights
No sums run on a bill of lading, and a printed number is not proof on its own, so packages, weights, volumes and the declared value are not checked by any sum.
What comes back for a bill of lading
At the top level, output.json gives you bol_number, booking_number, issue_date, shipped_on_board_date, carrier, vessel, voyage, place_of_receipt, port_of_loading, port_of_discharge, place_of_delivery, total_packages, total_gross_weight, total_volume, weight_unit, volume_unit, freight_terms, declared_value and currency. The three party objects (shipper, consignee and notify_party) each come back with name, address, vat_id, tax_id, email and phone. When a vat_id is present, we check the EU VAT number format for its country, and a tax_id holding a US EIN gets checked against its IRS prefix (masked numbers are skipped).
The cargo sits in two arrays: containers and goods. Each item in containers has number, seal, type, packages, gross_weight and volume. Each line in goods has marks, description, hs_code, packages, package_type, gross_weight and volume. Along with the JSON, every job writes output.xlsx and output.csv.
How container numbers are checked
Every containers[].number is tested against ISO 6346, which expects a 3-letter owner code, U, J or Z, a 6-digit serial and a check digit. We calculate the check digit from the weighted sum of the first 10 characters, each weighted by 2 to the power of its position, mod 11 and then mod 10. If a string breaks the pattern, it fails with "not an ISO 6346 container number (owner code, U/J/Z, 6 digits, check digit)", and if the last digit is wrong, it fails with "the ISO 6346 check digit does not hold".
Why the counts and weights stay unchecked
A bill of lading gets no arithmetic checks because our math engine has no bill of lading family. In our system, numbers only count as checked by math on a confirmed total, a read on another path or a checksum, while dates are checked by their own band's words or a second read, and text by the words or a second read. A number proves nothing by being printed: the wrong column, the wrong field and a flipped sign are all printed.
That is why the package counts, weights, volumes and declared value in our bol-vliestroom.pdf run stay unchecked, and the run box names them. A failing check would make the job a discrepancy; with some values checked and others not, it comes back partial.
What it costs
Pay-as-you-go is $0.02 a page, dropping to $0.01 a page past 5,000 pages in a UTC month, so 1,000 one-page bills of lading a month cost $20. You get $1 in free credit (50 pages) on Google sign-in with no card required, and failed jobs and exact duplicates cost 0. If you have steady volume, the Pro plan on the pricing page is $29 a month or $290 a year with 1,500 pages included and $0.01 a page after that.
FAQ
Common questions
Does it check container numbers?
Yes, every containers[].number is checked against the ISO 6346 standard. It checks for a 3-letter owner code, U, J or Z, a 6-digit serial and a valid check digit; a number that fails either test fails its check, and a failing check makes the job a discrepancy.
Why does a bill of lading come back partial?
A bill of lading gets no arithmetic checks, and a number found on the page is not proof on its own. Names, places, dates and container numbers can count as checked by the words on the page, a second read or the ISO 6346 check digit, but package counts, weights, volumes and the declared value have no sum to prove them, so a job where some values are checked and others are not comes back partial.
Does it read scanned bills of lading and photos?
Yes. You can send PDF, JPEG, PNG, WebP, HEIC, TIFF, DOCX, XLSX, CSV, HTML, TXT, EML, MSG and ZIP files, up to 25 MB as multipart or 100 MB by file_url or /v1/uploads, with up to 250 pages a job. Pages with a text layer are read from it and counted in digital_pages (like bol-vliestroom.pdf in our run), while scanned pages and photos without a text layer go through OCR and are counted in ocr_pages.
What files does a bill of lading job write?
Each job writes output.json, output.xlsx and output.csv. output.csv holds the document's main list with one row per line and the header fields in front; on our bol-vliestroom.pdf run, it has one row per goods line with the columns bol_number, marks, description, hs_code, packages, package_type, gross_weight, volume.
How much does bill of lading OCR cost?
It costs $0.02 a page for the first 5,000 pages in a UTC month and $0.01 a page after that, or $29 a month ($290 a year) on the Pro plan with 1,500 pages included and $0.01 a page past that. DOCX, HTML and email bodies bill 1 page per 3000 characters, XLSX and CSV bill 1 page per 50 rows, and failed jobs and exact duplicates cost 0.
Related
- Purchase order OCR APIPO number, buyer, supplier, lines and totals as JSON, with every line and total re-added.
- PDF to JSON APIYour own JSON Schema in, those fields out, with sums re-added.
- PDF table extraction APITables from PDFs and scans as JSON, Excel and CSV, whole across page breaks.
- Document parsing APIsparserkit leads for fields, totals and tables at $0.02 a page, ahead of Reducto, LlamaParse and Azure Document Intelligence.
- Invoice parser APILine items, taxes and totals as JSON, with every sum re-added.
Sources, checked
Start free
Send us your worst scan
Your first $1 is free: 50 pages with every check and export, no card.
