Query (Feature Service/Layer)
Request parameter: returnCentroid
That's a good question. From the "What's New", it looks like it didn't appear until 10.6
... but since the OP was from 2016, I seems like it would have been earlier like 10.5.x....?
We too are still on ArcGIS Server 10.4 and had to come up with a solution. Perhaps not the most performance-optimized, we opted to create a publish a Geoprocessing service to return the centroid coordinate information for other map services. Basically, the GP service is a proxy or a wrapper for the desired polygon map service which we'd like centroid coordinates and some very simple python delivers that info.