GET
/
v1-preview
/
models
/
packing-list
/
{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.packing_list.get_extracted_fields(document_id="wh23anb5xjf0ntw5taase5qz")

    assert res.packing_list is not None

    # Handle response
    print(res.packing_list)
{
  "meta": {
    "id": "wh23anb5xjf0ntw5taase5qz",
    "name": "document.jpg",
    "createdAt": "2025-02-07T17:44:06.949Z",
    "model": "packing-list",
    "status": "Processed",
    "pageCount": 10,
    "errors": [
      {
        "message": "Total is required"
      }
    ]
  },
  "fields": {
    "shipper": {
      "name": "Global Exports Ltd",
      "address": "123 Business Park, London, UK EC2A 4PB",
      "taxId": "GB123456789",
      "iban": "GB29NWBK60161331926819",
      "bankAccount": "12345678",
      "bankCode": "NWBK"
    },
    "consignee": {
      "name": "US Imports Inc",
      "address": "456 Trade Street, New York, NY 10001"
    },
    "buyer": {
      "name": "US Retail Corp",
      "address": "789 Shopping Mall, New York, NY 10002"
    },
    "billTo": {
      "name": "US Imports Inc",
      "address": "456 Trade Street, New York, NY 10001"
    },
    "packingListNumber": "PL-2024-001",
    "packingListDate": "2024-03-15",
    "invoiceNumber": "INV-2024-001",
    "invoiceDate": "2024-03-15",
    "purchaseOrder": [
      {
        "number": "PO-2024-001",
        "date": "2024-03-01"
      }
    ],
    "billOfLadingNumber": "BOL-2024-001",
    "countryOfOrigin": "GB",
    "countryOfFinalDestination": "US",
    "modeOfTransportation": "SEA/OCEAN",
    "shippingDate": "2024-03-20",
    "incoterm": "CIF",
    "lineItems": [
      {
        "position": 1,
        "articleNumber": "ART-001",
        "orderNumber": "PO-2024-001",
        "invoiceNumber": "INV-2024-001",
        "countryOfOrigin": "GB",
        "containerNumber": "CONT-001",
        "description": "Industrial Machinery",
        "quantity": 5,
        "unitOfMeasurement": "PCS",
        "packageQuantity": 2,
        "packageUnitOfMeasurement": "BOX",
        "netWeight": 1000,
        "netWeightUnitOfMeasurement": "KG",
        "grossWeight": 1100,
        "grossWeightUnitOfMeasurement": "KG",
        "volume": 2.5,
        "volumeUnitOfMeasurement": "M3",
        "dimensions": "100x50x50",
        "dimensionsUnitOfMeasurement": "CM",
        "length": 100,
        "width": 50,
        "height": 50
      }
    ],
    "totalQuantity": {
      "amount": 10,
      "unitOfMeasurement": "PCS"
    },
    "totalPackages": {
      "amount": 4,
      "unitOfMeasurement": "BOX"
    },
    "totalNetWeight": {
      "amount": 2000,
      "unitOfMeasurement": "KG"
    },
    "totalGrossWeight": {
      "amount": 2200,
      "unitOfMeasurement": "KG"
    },
    "totalVolume": {
      "amount": 5,
      "unitOfMeasurement": "M3"
    },
    "totalDimensions": {
      "amount": 200,
      "unitOfMeasurement": "CM"
    }
  }
}

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 Packing List 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 packing list

Example:
{
  "shipper": {
    "name": "Global Exports Ltd",
    "address": "123 Business Park, London, UK EC2A 4PB",
    "taxId": "GB123456789",
    "iban": "GB29NWBK60161331926819",
    "bankAccount": "12345678",
    "bankCode": "NWBK"
  },
  "consignee": {
    "name": "US Imports Inc",
    "address": "456 Trade Street, New York, NY 10001"
  },
  "buyer": {
    "name": "US Retail Corp",
    "address": "789 Shopping Mall, New York, NY 10002"
  },
  "billTo": {
    "name": "US Imports Inc",
    "address": "456 Trade Street, New York, NY 10001"
  },
  "packingListNumber": "PL-2024-001",
  "packingListDate": "2024-03-15",
  "invoiceNumber": "INV-2024-001",
  "invoiceDate": "2024-03-15",
  "purchaseOrder": [
    {
      "number": "PO-2024-001",
      "date": "2024-03-01"
    }
  ],
  "billOfLadingNumber": "BOL-2024-001",
  "countryOfOrigin": "GB",
  "countryOfFinalDestination": "US",
  "modeOfTransportation": "SEA/OCEAN",
  "shippingDate": "2024-03-20",
  "incoterm": "CIF",
  "lineItems": [
    {
      "position": 1,
      "articleNumber": "ART-001",
      "orderNumber": "PO-2024-001",
      "invoiceNumber": "INV-2024-001",
      "countryOfOrigin": "GB",
      "containerNumber": "CONT-001",
      "description": "Industrial Machinery",
      "quantity": 5,
      "unitOfMeasurement": "PCS",
      "packageQuantity": 2,
      "packageUnitOfMeasurement": "BOX",
      "netWeight": 1000,
      "netWeightUnitOfMeasurement": "KG",
      "grossWeight": 1100,
      "grossWeightUnitOfMeasurement": "KG",
      "volume": 2.5,
      "volumeUnitOfMeasurement": "M3",
      "dimensions": "100x50x50",
      "dimensionsUnitOfMeasurement": "CM",
      "length": 100,
      "width": 50,
      "height": 50
    }
  ],
  "totalQuantity": { "amount": 10, "unitOfMeasurement": "PCS" },
  "totalPackages": { "amount": 4, "unitOfMeasurement": "BOX" },
  "totalNetWeight": { "amount": 2000, "unitOfMeasurement": "KG" },
  "totalGrossWeight": { "amount": 2200, "unitOfMeasurement": "KG" },
  "totalVolume": { "amount": 5, "unitOfMeasurement": "M3" },
  "totalDimensions": { "amount": 200, "unitOfMeasurement": "CM" }
}
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.