GET
/
v1-preview
/
models
/
dangerous-goods-declaration
/
{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.dangerous_goods_declaration.get_extracted_fields(document_id="wh23anb5xjf0ntw5taase5qz")

    assert res.dangerous_goods_declaration is not None

    # Handle response
    print(res.dangerous_goods_declaration)
{
  "meta": {
    "id": "wh23anb5xjf0ntw5taase5qz",
    "name": "document.jpg",
    "createdAt": "2025-02-07T17:44:06.949Z",
    "model": "dangerous-goods-declaration",
    "status": "Processed",
    "pageCount": 10,
    "errors": [
      {
        "message": "Total is required"
      }
    ]
  },
  "fields": {
    "shipper": {
      "name": "Chemical Solutions Ltd",
      "address": "123 Industrial Park, Manchester, UK M1 1AA"
    },
    "consignee": {
      "name": "Global Logistics Inc",
      "address": "456 Transport Ave, New York, NY 10001"
    },
    "carrier": {
      "name": "Air Freight Express",
      "address": "789 Cargo Terminal, JFK Airport, NY 11430"
    },
    "transportationDocumentNumber": "DGD-2024-001",
    "aircraftType": "Boeing 747-400F",
    "airportOfDeparture": "Manchester International Airport",
    "airportOfDestination": "John F. Kennedy International Airport",
    "additionalHandlingInformation": "Keep away from heat sources. Handle with care.",
    "shipmentType": "Non-radioactive",
    "shippersReferenceNumber": "REF-2024-001",
    "lineItems": [
      {
        "unNumber": "UN1789",
        "properShippingName": "Hydrochloric acid",
        "numberOfPieces": 5,
        "packageType": "4G",
        "quantityPerPackage": 10,
        "unitOfMeasure": "L",
        "classOrDivision": "8",
        "packingGroup": "II",
        "packingInstruction": "P001",
        "overpackUsed": true
      }
    ],
    "certification": {
      "nameOfSignatory": "John Smith",
      "placeAndDate": "Manchester, 2024-03-15"
    },
    "emergencyTelephoneNumber": "+44 20 7123 4567"
  }
}

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 Dangerous Goods Declaration 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 dangerous goods declaration

Example:
{
  "shipper": {
    "name": "Chemical Solutions Ltd",
    "address": "123 Industrial Park, Manchester, UK M1 1AA"
  },
  "consignee": {
    "name": "Global Logistics Inc",
    "address": "456 Transport Ave, New York, NY 10001"
  },
  "carrier": {
    "name": "Air Freight Express",
    "address": "789 Cargo Terminal, JFK Airport, NY 11430"
  },
  "transportationDocumentNumber": "DGD-2024-001",
  "aircraftType": "Boeing 747-400F",
  "airportOfDeparture": "Manchester International Airport",
  "airportOfDestination": "John F. Kennedy International Airport",
  "additionalHandlingInformation": "Keep away from heat sources. Handle with care.",
  "shipmentType": "Non-radioactive",
  "shippersReferenceNumber": "REF-2024-001",
  "lineItems": [
    {
      "unNumber": "UN1789",
      "properShippingName": "Hydrochloric acid",
      "numberOfPieces": 5,
      "packageType": "4G",
      "quantityPerPackage": 10,
      "unitOfMeasure": "L",
      "classOrDivision": "8",
      "packingGroup": "II",
      "packingInstruction": "P001",
      "overpackUsed": true
    }
  ],
  "certification": {
    "nameOfSignatory": "John Smith",
    "placeAndDate": "Manchester, 2024-03-15"
  },
  "emergencyTelephoneNumber": "+44 20 7123 4567"
}
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.