Replacing variables in endcode on API:printer/stop