API Documentation
Documents
Document Conversion
Personal Earnings Statement
Certificate Of Origin
Dangerous Goods Declaration
International Consignment Note
Customs Declaration
Get Customs Declaration Fields
This endpoint returns an object representing the extracted customs-declaration model fields from a document.
GET
/
v1-preview
/
models
/
customs-declaration
/
{documentId}
Copy
Ask AI
using ABBYY.DocumentAI;
using ABBYY.DocumentAI.Schemas.Components;
var sdk = new DocumentAI(apiKeyAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Models.CustomsDeclaration.GetExtractedFieldsAsync(documentId: "wh23anb5xjf0ntw5taase5qz");
// handle response
Copy
Ask AI
{
"meta": {
"id": "wh23anb5xjf0ntw5taase5qz",
"name": "document.jpg",
"createdAt": "2025-02-07T17:44:06.949Z",
"model": "customs-declaration",
"status": "Processed",
"pageCount": 10,
"errors": [
{
"message": "Total is required"
}
]
},
"fields": {
"movementReferenceNumber": "22GB12345678901234",
"movementReferenceNumberBarcode": "22GB12345678901234",
"issuingDate": "2024-03-15",
"customsOffice": "GB123456",
"declarationType": {
"part1": "EX",
"part2": "A",
"part3": ""
},
"forms": [
{
"part1": 1,
"part2": 3
}
],
"securityDeclaration": "S",
"items": 5,
"totalPackages": 10,
"referenceNumber": [
{
"referenceNumber": "REF-2024-001"
},
{
"referenceNumber": "REF-2024-002"
}
],
"transportChargesMethodOfPaymentCode": "PP",
"consignor": {
"name": "UK Exports Ltd",
"address": "123 Business Park, London, UK EC2A 4PB",
"eoriNumber": "GB123456789012"
},
"consignee": {
"name": "US Imports Inc",
"address": "456 Trade Street, New York, NY 10001",
"eoriNumber": "US987654321098"
},
"declarant": [
{
"name": "John Smith",
"address": "789 Customs House, London, UK EC3A 1AA",
"eoriNumber": "GB123456789013"
}
],
"exportCountryCode": "GB",
"destinationCountryCode": "US",
"countriesOfRoutingCodes": "GB, US",
"identityOfMeansOfTransportAtDeparture": "TRUCK123",
"nationalityOfMeansOfTransportAtDeparture": "GB",
"container": "1",
"identityOfMeansOfTransportAtBorder": "TRUCK123",
"nationalityOfMeansOfTransportAtBorder": "GB",
"currency": "EUR",
"total": 15000,
"exchangeRate": 1.085,
"modeOfTransportAtBorder": "road",
"internalModeOfTransport": "road",
"customsOfficeOfExit": "GB123456",
"locationOfGoods": "London Port Terminal",
"grossWeightInKg": 500,
"sealNumber": "SEAL123456",
"controlByOfficeOfDispatch": {
"result": "Cleared",
"sealsAffixed": true,
"sealsIdentity": "SEAL123456",
"timeLimit": "2 hours"
}
}
}
Authorizations
Our API offers authentication via API keys. You can obtain an API key from https://developer.abbyy.com
Path Parameters
The id of the document
Response
200
application/json
Extracted Customs Declaration Data Response
Was this page helpful?
Copy
Ask AI
using ABBYY.DocumentAI;
using ABBYY.DocumentAI.Schemas.Components;
var sdk = new DocumentAI(apiKeyAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Models.CustomsDeclaration.GetExtractedFieldsAsync(documentId: "wh23anb5xjf0ntw5taase5qz");
// handle response
Copy
Ask AI
{
"meta": {
"id": "wh23anb5xjf0ntw5taase5qz",
"name": "document.jpg",
"createdAt": "2025-02-07T17:44:06.949Z",
"model": "customs-declaration",
"status": "Processed",
"pageCount": 10,
"errors": [
{
"message": "Total is required"
}
]
},
"fields": {
"movementReferenceNumber": "22GB12345678901234",
"movementReferenceNumberBarcode": "22GB12345678901234",
"issuingDate": "2024-03-15",
"customsOffice": "GB123456",
"declarationType": {
"part1": "EX",
"part2": "A",
"part3": ""
},
"forms": [
{
"part1": 1,
"part2": 3
}
],
"securityDeclaration": "S",
"items": 5,
"totalPackages": 10,
"referenceNumber": [
{
"referenceNumber": "REF-2024-001"
},
{
"referenceNumber": "REF-2024-002"
}
],
"transportChargesMethodOfPaymentCode": "PP",
"consignor": {
"name": "UK Exports Ltd",
"address": "123 Business Park, London, UK EC2A 4PB",
"eoriNumber": "GB123456789012"
},
"consignee": {
"name": "US Imports Inc",
"address": "456 Trade Street, New York, NY 10001",
"eoriNumber": "US987654321098"
},
"declarant": [
{
"name": "John Smith",
"address": "789 Customs House, London, UK EC3A 1AA",
"eoriNumber": "GB123456789013"
}
],
"exportCountryCode": "GB",
"destinationCountryCode": "US",
"countriesOfRoutingCodes": "GB, US",
"identityOfMeansOfTransportAtDeparture": "TRUCK123",
"nationalityOfMeansOfTransportAtDeparture": "GB",
"container": "1",
"identityOfMeansOfTransportAtBorder": "TRUCK123",
"nationalityOfMeansOfTransportAtBorder": "GB",
"currency": "EUR",
"total": 15000,
"exchangeRate": 1.085,
"modeOfTransportAtBorder": "road",
"internalModeOfTransport": "road",
"customsOfficeOfExit": "GB123456",
"locationOfGoods": "London Port Terminal",
"grossWeightInKg": 500,
"sealNumber": "SEAL123456",
"controlByOfficeOfDispatch": {
"result": "Cleared",
"sealsAffixed": true,
"sealsIdentity": "SEAL123456",
"timeLimit": "2 hours"
}
}
}
Assistant
Responses are generated using AI and may contain mistakes.