Using MAPTM on your shipping documents
MAPTM is the code you will normally see for Tanger Med on carrier paperwork. Bookings and bills of lading print the port of loading and port of discharge as UN/LOCODEs, and carrier schedule and tracking feeds use them too. The first two letters, MA, are the ISO 3166-1 country code for Morocco; the last three identify the place.
A UN/LOCODE names a place, not a berth. Where a port city has several container terminals, UNECE often gives the terminals their own codes alongside the city code, so a booking can legitimately show a code you didn’t expect. Take the code from the carrier booking, not the one that looks most like the port name.
Schedule D codes exist only for US ports, so Tanger Med doesn’t have one. If Tanger Med is your origin, the Schedule D code that matters is your US port of entry’s: every US port page in this tool shows it where CBP publishes one.