server sales api newTicket refactor