Proper Conditions for Network Unlock?

I am trying to perform a carrier unlock on my AT&T HTC One so I can use it overseas while I am travelling. I have contacted AT&T and am waiting for an unlock code. In the mean time, I understand I need to be on a stock ROM for the unlock code to work. I have the ROM downloading, but am curious if I need to return the phone completely to stock. My phone is rooted and S-Off - do I need to reverse both of these conditions? I'm also wondering if I need to be on a stock recovery or not.

XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality.Are you a developer?