When a function on objects lifts to a functor?

Let $$\mathbf{C}$$ and $$\mathbf{D}$$ be two categories with classes of objects $$\mathbf{C}_0$$ and $$\mathbf{D}_0$$, respectively. Consider a function $$f:\mathbf{C}_0\rightarrow \mathbf{D}_0$$. When $$f$$ lifts to a functor $$F:\mathbf{C}\rightarrow \mathbf{D}$$? More precisely:

• under which conditions there exists a functor $$F:\mathbf{C}\rightarrow \mathbf{D}$$ such that $$F_0=f$$?

Of course, if such a functor exists then it is generally highly non-unique. Indeed, the choice of an automorphism of $$f(X)\in \mathbf{D}_0$$ for every $$X\in \mathbf{C}_0$$ allows us to modify $$F$$ on morphisms.

Any help is welcome. If the question is stupid, I'm sorry.

• Some necessary conditions: if there's an arrow $a\to b$ in $C$, there must also exist an arrow $f(a) \to f(b)$ in $D$. Isomorphic objects must be mapped to isomorphic objects. – Berci May 13 '20 at 18:02
• Of course. Thank you for the comment. It would be very appreciate some sufficient conditions. – Math-Phys-Cat Group May 13 '20 at 18:04

One easy case: if $$\mathbf C = C(Q)$$ is the free category on a quiver $$Q$$, then it is sufficient that $$f$$ extends to a quiver homomorphism from $$Q$$ to the underlying quiver of $$\mathbf D$$; i.e., that $$\mathbf D(f(a), f(b))$$ is non-empty whenever there is an edge from $$a$$ to $$b$$ in $$Q$$.