You must file an APIS when arriving from a foreign area (international) and departing to a foreign area. You do not have to file an APIS when arriving/or departing from or the United States or Puerto Rico.
Please visit the below websites for more assistance regarding eAPIS.