FIRMS Code vs. Port Code vs. Schedule D and Schedule K Codes
Reviewed by Gustavo Melendez · Last reviewed 2026-10-27. Dates given for CBP's FIRMS list in this guide are data dates, not review dates.
A FIRMS code identifies one facility, such as a terminal, container freight station or bonded warehouse, inside a CBP port. A CBP port code identifies the U.S. port itself and comes from Schedule D. A Schedule K code identifies a foreign port. One import can involve all three: the Schedule K code of the port where the cargo was loaded abroad, the port code where it arrives, and the FIRMS code of the facility where it waits.
How do the codes compare?
| FIRMS code | CBP port code (Schedule D) | Schedule K code | |
|---|---|---|---|
| Identifies | A facility inside a CBP port | A U.S. port | A foreign port |
| Format | 4 letters or digits | 4 digits: 2-digit district and 2-digit port | 5 digits |
| Example | E430, MAHER TERMINAL | 4601, New York/Newark Area | 57035, Shanghai |
| Maintained by | CBP | CBP for ACE; the Census Bureau keeps a statistical version | U.S. Army Corps of Engineers; CBP publishes it for ACE |
| Typical use | Location of goods, in-bond arrival location, FTZ site | Port of entry, port of unlading, in-bond destination | Foreign port of lading |
What is a CBP port code (Schedule D)?
Schedule D is the classification of U.S. customs districts and ports. A port code has four digits: the first two are the district and the last two are the port within it. Los Angeles is 2704 and Long Beach is 2709, both in district 27.
CBP publishes the valid port codes for ACE as Appendix E, Schedule D: U.S. CBP Port Codes, part of its manifest implementation guide. The Census Bureau publishes a Schedule D table for trade statistics.
The two lists overlap but are not identical. CBP’s ACE list includes 4601, New York/Newark Area. The Census table lists New York as 1001 and Newark as 1003, and has no 4601. FIRMS records follow CBP’s codes: hundreds of New Jersey facilities are registered under 4601, and none under 1003. When a filing asks for a port code, use CBP’s list.
What is a Schedule K code?
Schedule K classifies foreign ports by country. Codes have five digits, and ports in the same country generally share the first three. These examples come from CBP’s Schedule K appendix:
| Schedule K | Foreign port |
|---|---|
| 57035 | Shanghai, China |
| 57078 | Yantian, China |
| 58023 | Busan, South Korea |
| 42157 | Rotterdam, Netherlands |
The main Schedule K list is maintained by the U.S. Army Corps of Engineers, and CBP publishes it for ACE as Appendix F of its manifest implementation guide. ACE checks these codes too: CBP’s FTZ error list includes error 065 for an invalid Schedule K code for the port where goods were loaded.
How does a FIRMS code relate to the port code?
Every FIRMS record is registered under one CBP port, and on a filing the FIRMS code and the port should agree. CBP checks this in several places:
| Where | Check | Source |
|---|---|---|
| In-bond arrival, non-air | ACE checks that the FIRMS code is within the in-bond arrival port | CBP trade notice, August 2024 |
| Cargo release | Error 321, FIRMS location not in the same port cluster | CSMS #66026456 |
| FTZ admission | Error 052, the port code and the FIRMS code are not in the same port cluster | CATAIR Appendix P |
Port clusters matter here. Some ports accept FIRMS codes registered under a neighboring port, but CBP does not publish clusters in the FIRMS list. A code registered under a different port is a reason to check with the port or your broker, not proof the code is wrong.
Why doesn’t the registered port match the city?
A FIRMS code’s port is the CBP port it is registered under, which is not always the port named after the facility’s city:
- LBCT LLC in Long Beach (WAC8) is registered under 2704, Los Angeles. Port 2709, Long Beach, has only six published records.
- Everport Terminal Services, Inc. in Oakland (WBA5) is registered under 2809, San Francisco, while SSA TERMINALS in Oakland (Z985) is under 2811, Oakland.
- The same address can carry codes under two ports. At 70 Hamilton Ave, Brooklyn, EAB2 is registered under 4601 and E026 under 1001.
Always compare the registered port, not the city, with the port on your filing. The port directory groups codes by registered port.
What about UN/LOCODEs?
Carrier and booking systems often use UN/LOCODEs, five-character location codes from the United Nations Economic Commission for Europe (UNECE), such as USLAX for Los Angeles. They are not CBP codes. If your system stores UN/LOCODEs, map them to the CBP port code before you build a CBP filing, and keep the FIRMS code as a separate field.
Which code goes where?
| Question on the filing | Code |
|---|---|
| Which facility is the cargo at? | FIRMS code |
| Which U.S. port is it arriving at or entered through? | CBP port code (Schedule D) |
| Which foreign port was it loaded at? | Schedule K code |
Checking FIRMS codes against ports in software
FIRMSapi returns each code’s registered port, and you can filter search by port or list a port’s codes with the ports endpoints. The validation endpoint takes the port on your filing and checks that the code is registered there, and lists port clusters among the things to confirm in ACE. For the full sequence of checks, read validating FIRMS codes before you file.