Certificate for an internal server (only open from office)

From a quick look - https://wiki.gandi.net/en/xml-api - gandi has a perfectly good API for dns records, so you should be able to use the DNS method.