Custom CPT with custom URL

I am currently working on a project for a client that is using Wordpress multi site. We have the requirement that needs to make use of a CPT called office, however I need to be able to route the CPT items to the root url, for example:

https://{websitename}.com/office/{office-name}
to
https://{websitename}.com/{office-name}

Trying to simply remove the /office/ from the url using custom urls does not seem to work and I think it is because it is looking for the CPT in the {post,pages,media} endpoints. I am guessing this from the 404 error text:
errorStatusText: "post type from endpoints \"posts,pages,media\" with slug \"{office-name}\" not found"

Is there a way ot add the office cpt to the list of endpoints without having /office/ in the url?

Thanks in advanced.

Hi,
if your cpt is available via rest api you probably need a custom handler, wich will basically tell Frontity what to do with your url

Take a look here