[TASK] Move domain logic to Api class