Bill of lading OCR and freight document extraction
docRefinery reads bills of lading, commercial invoices, packing lists, customs declarations and delivery notes, and returns their fields as structured data with confidence scores. Each carrier's and forwarder's form is learned once and remembered, so coordinators reconcile against the shipment record instead of re-keying it.
Updated
OCR is the easy part
Plain OCR turns a scanned bill of lading into a block of text. A coordinator still has to find the consignee, the container numbers and the gross weight in it, and type them into the shipment record. docRefinery returns those as named fields: the B/L number as a value, the containers as a table, each with the page and region it was read from. The reconciliation is the work; the typing is the tax on it.
What the shipment record needs from each document
| Document | Fields teams need |
|---|---|
| Bill of lading | B/L number, shipper, consignee, notify party, vessel and voyage, ports of loading and discharge, container and seal numbers, package count, gross weight, description of goods, freight terms |
| Commercial invoice | Seller, buyer, invoice number, Incoterms, currency, line items, HS codes, declared value |
| Packing list | Packages, marks and numbers, dimensions, net and gross weight per line |
| Customs declaration | Declarant, entry or declaration number, HS codes, customs value, duties and taxes |
| Delivery note or proof of delivery | Delivery date, recipient, items delivered, remarks such as shortages or damage |
| Certificate of origin | Exporter, consignee, country of origin, goods description, HS codes |
Bills of lading, packing lists and delivery notes are in the 20-type catalogue. Freight documents outside the catalogue, such as customs declarations or certificates of origin, can have a custom classifier trained at no charge.
Freight fields you can check automatically
Many freight fields have a structure, and structure can be checked. A container number is a three-letter owner code, an equipment category letter, a six-digit serial number and a check digit. HS codes are standardised internationally at six digits, and countries append digits of their own to reach 8- or 10-digit national codes. Workflow rules run on every document and can test these: a container number has the right shape, a code has at least six digits, packing list weights add up to the gross weight on the bill. A failed rule flags the run for a person instead of letting the mismatch reach the shipment record.
One carrier, one bill of lading form
Carriers and forwarders each print their own bill of lading and send thousands of them. Learning one carrier's form covers every shipment it handles, and a forwarder's house bill is the same layout from one booking to the next. A team working with a few dozen carriers and forwarders sees a few dozen layouts, each learned once and remembered after that. When a carrier changes its form, the new one is re-trained the first time it arrives. See vendor layout changes.
Handwritten remarks go to a coordinator
Freight documents carry handwriting at exactly the wrong moments: a remark on a delivery note, a corrected weight, a stamped seal number. Fields like these often score below your threshold and go to the review queue, where the coordinator sees the source page with the value's location highlighted, corrects it, and adds or removes table rows. A field that is not on the document, such as a missing notify party, comes back null instead of a guess.
Built for paperwork that crosses borders
A shipment file travels through several companies and countries, so the strengths that matter differ from a finance desk's.
- 70+ languages and scripts, for carriers, forwarders and consignees who don't print in English.
- Shipment packs in one go. A long PDF of bill of lading, invoice and packing list is segmented into its documents, each recognised for what it is.
- One output format. Every freight document returns the same field and table shape, so a new document type adds no parsing work.
- Your TMS's vocabulary. A Return as alias sets the output key, so B/L number can arrive as
mbl_noand gross weight asgross_kg. - Containers and lines as rows, with page and box citations on the cells.
- Customs forms on request. We train, host and re-train a custom type for them without charging for it.
- A workflow per lane or forwarder, started from one sample document, with versions, replay and compare before it goes live.
- Coordinators' fixes reused. Correct a misread once and it can come back as a suggested fix for that carrier's form, proven on the form's own documents first.
From document to the shipment in your TMS
Your code writes the JSON to the shipment (quickstart), or a coordinator exports from the dashboard. Containers and line items stay as rows either way, and the Excel export gives each table its own sheet, ready to match against the booking. The Chrome extension, in early access and not in the Chrome Web Store yet, can auto-fill a carrier or customs web form from a document. There is no transport management system connector or webhook today; integrations are in design on the roadmap.
Freight work that does not need it
- Your carriers already send shipment data as EDI or electronic bills of lading. That data needs no extraction.
- You need goods classified, meaning the right HS code chosen. docRefinery extracts the codes printed on a document; it does not decide them.
- Most of your shipments come from carriers you use once, so few layouts repeat.
- You need tracking events or customs filing. docRefinery reads documents and stops there.
Common questions
What is the difference between bill of lading OCR and bill of lading extraction?
OCR turns the page into text. Extraction returns named fields from it, such as B/L number, shipper, consignee, ports, container and seal numbers and gross weight, with confidence scores and their place on the page. docRefinery does extraction, so the values can go straight into a shipment record or a review queue.
Can docRefinery check container numbers and HS codes?
Workflow rules run on every document and can check that a container number has the expected owner code, category letter, serial and check digit shape, or that an HS code has at least six digits. A failed rule flags the run for a person. docRefinery does not choose HS codes; it extracts the ones printed.
How does docRefinery handle different carriers' bill of lading formats?
Each carrier's form is learned the first time it arrives and remembered after that, so every later bill from that carrier is a known layout. When a carrier changes its form, the new layout is learned again with nothing for your team to schedule. Whichever carrier issued it, the output is the same format under your own Return as field names, so your TMS mapping doesn't change.
Sources
Related
- InvoiceExtract data from invoice PDFs and scans: 62 fields including line items and VAT, as JSON with confidence scores and page and box citations on values.
- Purchase orderTurn customer and supplier purchase orders into order lines, terms and delivery dates. A PO OCR API with confidence scores and box citations on values.
- Vendor layout changesWhy a sender changing their form breaks document extraction, how to detect a layout change early, how to handle it, and what to ask your extraction vendor.
- What is document data extraction?Document data extraction turns PDFs and scans into structured fields. How OCR, IDP, extraction APIs and LLM parsing differ, and how to choose between them.
- CompareHow docRefinery compares with Reducto, Extend, LlamaParse, Unstructured, Textract, Azure and Google on output, review and deployment, including where we trail.
- Create your account | docRefineryCreate a docRefinery account with Google. Starter is free up to 100 pages a month.
- Use casesWhere document extraction fits best: accounts payable, lending, KYC, insurance claims, logistics, healthcare admin and contracts, wherever senders repeat.
Bring the documents your team handles.
Upload a real file and see each field with its confidence score, ready to check.
100 pages a month free. No credit card, no sales call.