apid