Context : The study of high contrast imaged brown dwarfs and exoplanets depends strongly on evolutionary models . To estimate the mass of a directly imaged substellar object , its extracted photometry or spectrum is used and adjusted with model spectra together with the estimated age of the system . These models still need to be properly tested and constrained . HD 4747B is a brown dwarf close to the H burning mass limit , orbiting a nearby ( d = 19.25 \pm 0.58 pc ) , solar-type star ( G9V ) and has been observed with the radial velocity method over almost two decades now . Its companion was also recently detected by direct imaging , allowing a complete study of this particular object . Aims : We aim to fully characterize HD 4747B by combining a well constrained dynamical mass and a study of its observed spectral features in order to test evolutionary models for substellar objects and characterize its atmosphere . Methods : We combine the radial velocity measurements of HIRES and CORALIE taken over two decades and high contrast imaging of several epochs from NACO , NIRC2 and SPHERE to obtain a dynamical mass . From the SPHERE data we obtain a low resolution spectrum of the companion from Y to H band , as well as two narrow band-width photometric measurements in the K band . A study of the primary star allows in addition to constrain the age of the system as well as its distance . Results : Thanks to the new SPHERE epoch and NACO archival data combined with previous imaging data and high precision radial velocity measurements , we have been able to derive a well constrained orbit . The high eccentricity ( e = 0.7362 \pm 0.0025 ) of HD 4747B is confirmed , and the inclination as well as the semi-major axis are derived ( i = 47.3 \pm 1.6 ^ { \circ } , a = 10.01 \pm 0.21 au ) . We derive a dynamical mass of m _ { B } = 70.0 \pm 1.6 M _ { Jup } which is higher than a previous study , but in better agreement with the models . By comparing the object with known brown dwarfs spectra , we derive a spectral type of L9 and an effective temperature of 1350 \pm 50 K. With a retrieval analysis we constrain the oxygen and carbon abundances and compare them with the ones from the HR 8799 planets . Conclusions :