Moved API logic to seeds file