Back to Home
AES Filing API
Validate, prepare, and submit EEI filings to CBP's Automated Export System
https://api.compliancegrid.ai/v1/aes
22 endpoints
~45ms avg response
Overview
The AES Filing API provides end-to-end Electronic Export Information (EEI) filing. Phase 1 validates data against FTR 15 CFR Part 30 with 20+ cross-field rules (OFAC embargoes, Schedule B, ECCN, license types, DDTC/ITAR, filing deadlines). Phase 2 persists filings to a database, generates AESDirect WebLink forms for browser-based submission to CBP, handles success/fail callbacks to capture ITN numbers, and provides a full filing lifecycle (create → validate → submit → accepted/rejected → cancel).
Key Features
Full EEI schema validation per FTR 30.6 (USPPI, consignee, commodities, transport)
20+ cross-field rules: embargo check, license/ECCN consistency, VIN for vehicles
OFAC embargo screening for Cuba, Iran, North Korea, Syria, Crimea
Database-persisted filing lifecycle: DRAFT → VALIDATED → SUBMITTED → ACCEPTED/REJECTED
AESDirect WebLink integration — browser-redirect form generation for CBP submission
Success/fail callback handlers to capture ITN and AES response codes
Filing CRUD: create, get by ID/ref, list with filters, cancel
WebLink inquiry support for accepted filings with ITN
Filing deadline calculation by transport mode (vessel/air/truck/rail)
$2,500 per Schedule B threshold — automatic filing requirement determination
Canada exemption detection (FTR 30.36)
AESTIR-compatible AES-ready payload generation
10 reference endpoints for code tables (transport modes, EICs, license types, ports)
Endpoints
POST
/v1/aes/validatePOST
/v1/aes/prepareGET
/v1/aes/filing-requiredPOST
/v1/aes/filingPOST
/v1/aes/filing/:id/submitGET
/v1/aes/filing/:idGET
/v1/aes/filing/ref/:refGET
/v1/aes/filing/:id/weblink-formGET
/v1/aes/filing/:id/inquiryPOST
/v1/aes/filing/:id/cancelGET
/v1/aes/filingsGET
/v1/aes/weblink-infoGET
/v1/aes/reference/transport-modesGET
/v1/aes/reference/license-typesGET
/v1/aes/reference/export-info-codesGET
/v1/aes/reference/exemption-codesGET
/v1/aes/reference/embargoed-countriesGET
/v1/aes/reference/portsGET
/v1/aes/reference/in-bond-codesGET
/v1/aes/reference/consignee-typesGET
/v1/aes/reference/filing-typesGET
/v1/aes/reference/df-indicatorsQuick Example
aes-filing-example.ts
import ComplianceGrid from "@compliancegrid/sdk";
const client = new ComplianceGrid({
apiKey: process.env.COMPLIANCEGRID_API_KEY,
});
// Validate an EEI filing
const result = await client.aesFiling.validate({
usppi: {
companyName: "Acme Electronics Inc.",
ein: "12-3456789",
address: {
line1: "100 Export Blvd",
city: "Los Angeles",
state: "CA",
zip: "90210",
},
contactName: "John Smith",
phone: "310-555-0100",
},
ultimateConsignee: {
companyName: "Berlin Tech GmbH",
address: { line1: "Friedrichstr. 100", city: "Berlin", country: "DE" },
type: "D",
},
portOfExport: "4701",
portOfUnlading: "42101",
countryOfUltimateDestination: "DE",
modeOfTransport: "40",
carrierIdentification: "LUFT",
dateOfExport: "2026-03-15",
relatedPartyTransaction: false,
routedExportTransaction: false,
hazardousMaterials: false,
filingType: "predeparture",
commodities: [{
scheduleBNumber: "8471300000",
description: "Laptop computers, portable, with LCD",
quantity1: 50,
unitOfMeasure1: "NO",
shippingWeightKg: 150,
value: 75000,
exportInformationCode: "OS",
eccn: "5A992",
licenseType: "C33",
licenseNumber: "D123456",
originState: "CA",
dfIndicator: "D",
}],
});
console.log(result.valid); // true
console.log(result.filingRequired); // true
console.log(result.totalErrors); // 0
console.log(result.issues); // [{severity, code, message}]Sample Response
response.json
{
"success": true,
"data": {
"id": "eei_val_364c33ec5d324b1f",
"valid": true,
"filingRequired": true,
"filingRequiredReason": "One or more commodities exceed the $2,500 per Schedule B threshold (15 CFR 30.2(a)(1)(iv))",
"totalErrors": 0,
"totalWarnings": 1,
"totalInfo": 1,
"issues": [
{
"field": "commodities[0].licenseValue",
"severity": "WARNING",
"code": "LICENSE_VALUE_RECOMMENDED",
"message": "License value should be provided when a license number is specified.",
"regulation": "15 CFR 30.6(b)(23)"
},
{
"field": "commodities[0].value",
"severity": "INFO",
"code": "EEI_FILING_REQUIRED",
"message": "Commodity value ($75,000) exceeds the $2,500 threshold per Schedule B number. EEI filing is mandatory.",
"regulation": "15 CFR 30.2(a)(1)(iv)"
}
],
"validatedAt": "2026-02-19T15:21:14.377Z"
}
}