For a hypergraphic polytope there is a weighted quasisymmetric function which enumerates positive integer points in its normal fan and determines its $f$-polynomial. This quasisymmetric function invariant of hypergraphs extends the Stanley chromatic symmetric function of simple graphs. We consider a certain combinatorial Hopf algebra of hypergraphs and show that universal morphism to quasisymmetric functions coincides with this enumerator function. We calculate the $f$-polynomial of uniform hypergraphic polytopes.