AES Filing
Create Filing
POST
/v1/aes/filing$0.05 per callCreate a draft EEI filing.
Send an Idempotency-Key header to retry safely.
Request body
| Field | Type | Description |
|---|---|---|
| usppiNameoptional | string | min length 1 · max length 70 |
| usppirequired | object | |
| usppi.companyNamerequired | string | min length 1 · max length 70 |
| usppi.einrequired | string | Employer identification number, XX-XXXXXXX |
| usppi.addressrequired | object | |
| usppi.address.line1required | string | min length 1 · max length 60 |
| usppi.address.line2optional | string | max length 60 |
| usppi.address.cityrequired | string | min length 1 · max length 30 |
| usppi.address.staterequired | string | min length 2 · max length 2 |
| usppi.address.ziprequired | string | |
| usppi.contactNamerequired | string | min length 1 · max length 45 |
| usppi.phonerequired | string | min length 7 · max length 20 |
| usppi.emailoptional | string | format email |
| ultimateConsigneerequired | object | |
| ultimateConsignee.companyNamerequired | string | min length 1 · max length 70 |
| ultimateConsignee.addressrequired | object | |
| ultimateConsignee.address.line1required | string | min length 1 · max length 60 |
| ultimateConsignee.address.line2optional | string | max length 60 |
| ultimateConsignee.address.cityrequired | string | min length 1 · max length 30 |
| ultimateConsignee.address.stateProvinceoptional | string | max length 30 |
| ultimateConsignee.address.postalCodeoptional | string | max length 12 |
| ultimateConsignee.address.countryrequired | string | min length 2 · max length 2 |
| ultimateConsignee.typerequired | string | min length 1 · max length 1 |
| intermediateConsigneeoptional | object | |
| intermediateConsignee.companyNamerequired | string | min length 1 · max length 70 |
| intermediateConsignee.addressrequired | object | |
| intermediateConsignee.address.line1required | string | min length 1 · max length 60 |
| intermediateConsignee.address.line2optional | string | max length 60 |
| intermediateConsignee.address.cityrequired | string | min length 1 · max length 30 |
| intermediateConsignee.address.stateProvinceoptional | string | max length 30 |
| intermediateConsignee.address.postalCodeoptional | string | max length 12 |
| intermediateConsignee.address.countryrequired | string | min length 2 · max length 2 |
| forwardingAgentoptional | object | |
| forwardingAgent.companyNamerequired | string | min length 1 · max length 70 |
| forwardingAgent.einoptional | string | |
| forwardingAgent.addressrequired | object | |
| forwardingAgent.address.line1required | string | min length 1 · max length 60 |
| forwardingAgent.address.line2optional | string | max length 60 |
| forwardingAgent.address.cityrequired | string | min length 1 · max length 30 |
| forwardingAgent.address.staterequired | string | min length 2 · max length 2 |
| forwardingAgent.address.ziprequired | string | |
| portOfExportrequired | string | Schedule D port code (4 to 5 characters). See GET /v1/aes/reference/ports min length 4 · max length 5 |
| portOfUnladingrequired | string | Schedule K port code (4 to 5 characters) min length 4 · max length 5 |
| countryOfUltimateDestinationrequired | string | ISO 3166-1 alpha-2 country of ultimate destination. Embargoed destinations are flagged; see GET /v1/aes/reference/embargoed-countries min length 2 · max length 2 |
| modeOfTransportrequired | string | Mode of transport code: 10 vessel, 20 rail, 30 truck, 40 air, 50 mail, 60 pipeline, 70 passenger. See GET /v1/aes/reference/transport-modes |
| carrierIdentificationoptional | string | SCAC code, 2 to 4 uppercase letters. Required for air shipments |
| conveyanceNameoptional | string | max length 30 |
| dateOfExportrequired | string | Date of export, YYYY-MM-DD |
| relatedPartyTransactionrequired | boolean | |
| routedExportTransactionrequired | boolean | |
| hazardousMaterialsrequired | boolean | |
| filingTyperequired | string | predeparture or postdeparture one of "predeparture", "postdeparture" |
| inBondCodeoptional | string | In-bond code: 36, 37, 67, 68 or 70. See GET /v1/aes/reference/in-bond-codes |
| entryNumberoptional | string | max length 15 |
| ftzIdentifieroptional | string | max length 6 |
| shipperReferenceoptional | string | max length 30 |
| stateOfOriginoptional | string | min length 2 · max length 2 |
| commoditiesrequired | array of object | min 1 items · max 99 items |
| commodities[].scheduleBNumberrequired | string | Ten-digit Schedule B number, digits only |
| commodities[].descriptionrequired | string | min length 1 · max length 2500 |
| commodities[].quantity1required | number | min 0 |
| commodities[].unitOfMeasure1required | string | min length 1 · max length 5 |
| commodities[].quantity2optional | number | min 0 |
| commodities[].unitOfMeasure2optional | string | max length 5 |
| commodities[].shippingWeightKgrequired | number | min 0 |
| commodities[].valuerequired | number | min 0 |
| commodities[].exportInformationCoderequired | string | Export information code, for example OS. See GET /v1/aes/reference/export-info-codes |
| commodities[].eccnoptional | string | ECCN such as EAR99 or 5A002 |
| commodities[].licenseTyperequired | string | License code, for example C33 (no licence required). See GET /v1/aes/reference/license-types |
| commodities[].licenseNumberoptional | string | max length 40 |
| commodities[].licenseValueoptional | number | min 0 |
| commodities[].originStaterequired | string | Two-letter US state of origin min length 2 · max length 2 |
| commodities[].dfIndicatorrequired | string | one of "D", "F" |
| commodities[].vehicleIdNumberoptional | string | max length 25 |
| commodities[].ddtcRegistrationNumberoptional | string | max length 15 |
| commodities[].ddtcSignificantMilitaryEquipmentoptional | boolean | |
| commodities[].eligiblePartyCertificationoptional | boolean | |
| exemptionCodeoptional | string | |
| webhookoptional | object | Optional. Receive filing.accepted (with the ITN), filing.rejected and filing.stalled (an AESDirect handoff started over two hours ago with no result) events at this URL, signed with HMAC-SHA256 in the X-ComplianceGrid-Signature header (t=<unix>,v1=<hex> over "<t>.<raw body>"). If you send no secret, one is generated and returned once as data.webhookSigningSecret. |
| webhook.urlrequired | string | HTTPS URL. Private and internal addresses are refused. max length 2000 · format uri |
| webhook.secretoptional | string | Your own signing secret. min length 16 · max length 200 |
Response fields
The spec does not describe this response yet, and there is no captured example. Run the request with your sandbox key to see its shape.
Errors
- 400 invalid request
- 401 missing or bad key
- 403 not in your plan
- 429 rate limited, see Retry-After
- 402 payment required
- 5xx retry with backoff
Error bodies and codes are described in Error codes and troubleshooting.