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/validate
POST/v1/aes/prepare
GET/v1/aes/filing-required
POST/v1/aes/filing
POST/v1/aes/filing/:id/submit
GET/v1/aes/filing/:id
GET/v1/aes/filing/ref/:ref
GET/v1/aes/filing/:id/weblink-form
GET/v1/aes/filing/:id/inquiry
POST/v1/aes/filing/:id/cancel
GET/v1/aes/filings
GET/v1/aes/weblink-info
GET/v1/aes/reference/transport-modes
GET/v1/aes/reference/license-types
GET/v1/aes/reference/export-info-codes
GET/v1/aes/reference/exemption-codes
GET/v1/aes/reference/embargoed-countries
GET/v1/aes/reference/ports
GET/v1/aes/reference/in-bond-codes
GET/v1/aes/reference/consignee-types
GET/v1/aes/reference/filing-types
GET/v1/aes/reference/df-indicators
View full API reference

Quick 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"
  }
}

Ready to integrate?

Get your free API key and start building in minutes.

Get API Key