Are you making a plugin or a M4L device?
You can get the groove amount, but as far as the template I didn't see anything after a quick look through the API.
They are contained in .agr files, which I'm not really sure what to do with, i tried opening them in text edit, but there was a bunch of nonsense, so as far as getting the timing from the loaded groove, it's gonna be tough.
Keep in mind that groove patterns in Live are applied to clips where the timing of notes can easily be moved forward or backward. But if you want to apply a groove to incoming notes on-the-fly, the timing can only be moved forward (delayed).
it's essentially a buffer shuffler type of device - so it's important that the groove of the shuffled sections match that applied to any of the other Midi or Audio tracks in the project. I can get this by sending groovy 16th notes into the device and using those to trigger the shuffling but it'd be nice not to have to do that.
Well unless you can find a way to grab the .agr files within M4L and decode the information, you'll have to find a workaround.
I see no easy solution, unfortunately.
Edit: Although, now that I think about it, if you're shuffling audio that's coming into the device, it can already have the groove applied. So applying the groove to the shuffling seems redundant, unless I am not understanding you correctly.
I'm shuffling audio that is loaded into the device, I'm using incoming midi notes to trigger slices (these midi notes can have groove applied). This all works fine but I wanted to eliminate the need for the incoming midi notes. I didn't find a way to access groove information so far so I'll just stick with what I've got for now.