GET
/
v1-preview
/
models
/
bill-of-lading
/
{documentId}
from abbyy_document_ai import DocumentAi
import os


with DocumentAi(
    api_key_auth=os.getenv("DOCUMENTAI_API_KEY_AUTH", ""),
) as document_ai:

    res = document_ai.models.bill_of_lading.get_extracted_fields(document_id="wh23anb5xjf0ntw5taase5qz")

    assert res.bill_of_lading is not None

    # Handle response
    print(res.bill_of_lading)
{
  "meta": {
    "id": "wh23anb5xjf0ntw5taase5qz",
    "name": "document.jpg",
    "createdAt": "2025-02-07T17:44:06.949Z",
    "model": "bill-of-lading",
    "status": "Processed",
    "pageCount": 10,
    "errors": [
      {
        "message": "Total is required"
      }
    ]
  },
  "fields": {
    "bolNumber": "BOL123456",
    "bolDate": "2024-01-15",
    "poNumber": "PO345678",
    "salesOrderNumber": "SO789012",
    "shipmentId": "SHIP456789",
    "shipmentDate": "2024-01-16",
    "proNumber": "PRO123456",
    "vehicleNumber": "TRUCK789",
    "sealNumber": "SEAL123456",
    "terms": {
      "prepaid": true,
      "collect": false,
      "thirdParty": false
    },
    "nmfcCode": "12345",
    "class": "85",
    "portOfLoading": "San Francisco, USA",
    "portOfDischarge": "London, UK",
    "specialInstructions": "Handle with care, temperature controlled",
    "numberOfPackages": 100,
    "packageType": "PLT",
    "totalWeightNonmetric": 55115.5,
    "totalWeightUomNonmetric": "lbs",
    "totalWeightMetric": 25000,
    "totalWeightUomMetric": "kg",
    "hazardousMaterial": true,
    "shipper": {
      "name": "ACME Corporation",
      "address": "123 Business Ave, Suite 100, San Francisco, CA 94105"
    },
    "carrier": {
      "name": "Global Shipping Lines",
      "scacCode": "GSLX"
    },
    "consignee": {
      "name": "Global Imports Ltd",
      "customerId": "CUST123456",
      "address": "456 Commerce Street, London, UK EC2A 4PB"
    },
    "billTo": {
      "name": "Global Imports Ltd",
      "address": "456 Commerce Street, London, UK EC2A 4PB"
    }
  }
}

Authorizations

Authorization
string
header
required

Our API offers authentication via API keys. You can obtain an API key from https://developer.abbyy.com

Path Parameters

documentId
string
required

The id of the document

Response

200
application/json

Extracted Bill Of Lading Data Response

meta
object
required

Represents a document that has been submitted for processing.

Example:
{
  "id": "wh23anb5xjf0ntw5taase5qz",
  "name": "document.jpg",
  "createdAt": "2025-02-07T17:44:06.949Z",
  "model": "image-to-text",
  "status": "Processed",
  "pageCount": 10,
  "errors": [{ "message": "Total is required" }]
}
fields
object

Fields extracted from a bill of lading

Example:
{
  "bolNumber": "BOL123456",
  "bolDate": "2024-01-15",
  "poNumber": "PO345678",
  "salesOrderNumber": "SO789012",
  "shipmentId": "SHIP456789",
  "shipmentDate": "2024-01-16",
  "proNumber": "PRO123456",
  "vehicleNumber": "TRUCK789",
  "sealNumber": "SEAL123456",
  "terms": {
    "prepaid": true,
    "collect": false,
    "thirdParty": false
  },
  "nmfcCode": "12345",
  "class": "85",
  "portOfLoading": "San Francisco, USA",
  "portOfDischarge": "London, UK",
  "specialInstructions": "Handle with care, temperature controlled",
  "numberOfPackages": 100,
  "packageType": "PLT",
  "totalWeightNonmetric": 55115.5,
  "totalWeightUomNonmetric": "lbs",
  "totalWeightMetric": 25000,
  "totalWeightUomMetric": "kg",
  "hazardousMaterial": true,
  "shipper": {
    "name": "ACME Corporation",
    "address": "123 Business Ave, Suite 100, San Francisco, CA 94105"
  },
  "carrier": {
    "name": "Global Shipping Lines",
    "scacCode": "GSLX"
  },
  "consignee": {
    "name": "Global Imports Ltd",
    "customerId": "CUST123456",
    "address": "456 Commerce Street, London, UK EC2A 4PB"
  },
  "billTo": {
    "name": "Global Imports Ltd",
    "address": "456 Commerce Street, London, UK EC2A 4PB"
  }
}
validationErrors
object[]

An array of validation errors that occurred while processing the document. These typically do not prevent field extraction, but rather indicate issues extracting key fields.